net.sf.jagg.msd
Class EnumDiscriminator.EnumChainedExtractor<E>
java.lang.Object
net.sf.jagg.msd.AbstractExtractor<E,T>
net.sf.jagg.msd.ChainedExtractor<E,java.lang.Integer,T>
net.sf.jagg.msd.EnumDiscriminator.EnumChainedExtractor<E>
- Type Parameters:
E
- The type of element.
- All Implemented Interfaces:
- Extractor<E,java.lang.Integer>
- Enclosing class:
- EnumDiscriminator<T extends java.lang.Enum<T>>
protected class EnumDiscriminator.EnumChainedExtractor<E>
- extends ChainedExtractor<E,java.lang.Integer,T>
An EnumChainedExtractor
extracts the enum ordinal.
Method Summary |
java.lang.Integer |
getLabel(E element)
The label is the ordinal of the Enum . |
boolean |
isComplete(E element)
The discrimination is complete when the chained Extractor
is complete. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumDiscriminator.EnumChainedExtractor
public EnumDiscriminator.EnumChainedExtractor(Extractor<E,T> extractor)
- Create an
EnumChainedExtractor
that uses the given
Extractor
to retrieve the array.
- Parameters:
extractor
- An Extractor
whose label is an integer.
getLabel
public java.lang.Integer getLabel(E element)
- The label is the ordinal of the
Enum
.
- Specified by:
getLabel
in interface Extractor<E,java.lang.Integer>
- Specified by:
getLabel
in class ChainedExtractor<E,java.lang.Integer,T extends java.lang.Enum<T>>
- Parameters:
element
- The element.
- Returns:
- The ordinal of the
Enum
.
isComplete
public boolean isComplete(E element)
- The discrimination is complete when the chained
Extractor
is complete.
- Specified by:
isComplete
in interface Extractor<E,java.lang.Integer>
- Specified by:
isComplete
in class AbstractExtractor<E,T extends java.lang.Enum<T>>
- Parameters:
element
- The element.
- Returns:
true
if complete, false
otherwise.
Copyright © 2010-2013 jAgg Team. All Rights Reserved.