net.sf.jagg.msd
Class CharSequenceDiscriminator.CharPortionExtractor<E>

java.lang.Object
  extended by net.sf.jagg.msd.AbstractExtractor<E,T>
      extended by net.sf.jagg.msd.PortionExtractor<E,T>
          extended by net.sf.jagg.msd.CharSequenceDiscriminator.CharPortionExtractor<E>
Enclosing class:
CharSequenceDiscriminator<T extends java.lang.CharSequence>

protected class CharSequenceDiscriminator.CharPortionExtractor<E>
extends PortionExtractor<E,T>

A CharPortionExtractor is a PortionExtractor that extracts portions of CharSequences for their labels.


Field Summary
 
Fields inherited from class net.sf.jagg.msd.AbstractExtractor
amIAllComplete, myExtractor, myIndex
 
Constructor Summary
CharSequenceDiscriminator.CharPortionExtractor(Extractor<E,T> extractor)
          Create a CharPortionExtractor that first uses the given Extractor to get the value.
 
Method Summary
 int getLabel(E element)
          Returns the label, which is the specific character at the index, converted to an integer.
 boolean isComplete(E element)
          Discrimination is complete if the index has reached the length of the CharSequence.
 
Methods inherited from class net.sf.jagg.msd.AbstractExtractor
isAllComplete, setAllComplete, setIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharSequenceDiscriminator.CharPortionExtractor

public CharSequenceDiscriminator.CharPortionExtractor(Extractor<E,T> extractor)
Create a CharPortionExtractor that first uses the given Extractor to get the value.

Parameters:
extractor - Another Extractor.
Method Detail

getLabel

public int getLabel(E element)
Returns the label, which is the specific character at the index, converted to an integer.

Specified by:
getLabel in class PortionExtractor<E,T extends java.lang.CharSequence>
Parameters:
element - The element.
Returns:
The the specific character at the index, converted to an integer.

isComplete

public boolean isComplete(E element)
Discrimination is complete if the index has reached the length of the CharSequence.

Specified by:
isComplete in class AbstractExtractor<E,T extends java.lang.CharSequence>
Parameters:
element - An element.
Returns:
true if off the end of the CharSequence, false otherwise.


Copyright © 2010-2013 jAgg Team. All Rights Reserved.