net.sf.jagg.msd
Class ChainedExtractor<E,L,T>

java.lang.Object
  extended by net.sf.jagg.msd.AbstractExtractor<E,T>
      extended by net.sf.jagg.msd.ChainedExtractor<E,L,T>
Type Parameters:
E - The element type, matching Extractor.
L - The label type, matching Extractor.
T - The label type from a chained Extractor, from which this can generate a new label of type L.
All Implemented Interfaces:
Extractor<E,L>
Direct Known Subclasses:
ArrayDiscriminator.ArrayChainedExtractor, CalendarDiscriminator.CalendarChainedExtractor, ClassDiscriminator.ClassChainedExtractor, CollectionDiscriminator.CollectionChainedExtractor, DateDiscriminator.DateChainedExtractor, EnumDiscriminator.EnumChainedExtractor, PropertiesDiscriminator.MethodCallChainedExtractor, RandomAccessListDiscriminator.ListChainedExtractor

public abstract class ChainedExtractor<E,L,T>
extends AbstractExtractor<E,T>
implements Extractor<E,L>

A ChainedExtractor extracts a part of an element and returns it as the label. It relies on labels from a chained Extractor so it can produce its own labels based on that chained Extractor's labels. At the end of the chain is an Extractor that returns the element itself -- a SelfExtractor.

Since:
0.5.0
Author:
Randy Gettman
See Also:
SelfExtractor

Field Summary
 
Fields inherited from class net.sf.jagg.msd.AbstractExtractor
amIAllComplete, myExtractor, myIndex
 
Constructor Summary
ChainedExtractor(Extractor<E,T> extractor)
          Creates an ChainedExtractor that uses the given Extractor in a chain for its labels.
 
Method Summary
abstract  L getLabel(E element)
          Returns the label for a given element.
 
Methods inherited from class net.sf.jagg.msd.AbstractExtractor
isAllComplete, isComplete, setAllComplete, setIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jagg.msd.Extractor
isAllComplete, isComplete, setAllComplete
 

Constructor Detail

ChainedExtractor

public ChainedExtractor(Extractor<E,T> extractor)
Creates an ChainedExtractor that uses the given Extractor in a chain for its labels.

Parameters:
extractor - The chained Extractor.
Method Detail

getLabel

public abstract L getLabel(E element)
Returns the label for a given element.

Specified by:
getLabel in interface Extractor<E,L>
Parameters:
element - The element.
Returns:
The label.


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