net.sf.jagg.msd
Class CollectionDiscriminator.CollectionChainedExtractor<E,B>

java.lang.Object
  extended by net.sf.jagg.msd.AbstractExtractor<E,T>
      extended by net.sf.jagg.msd.ChainedExtractor<E,java.util.List<B>,java.util.Collection<B>>
          extended by net.sf.jagg.msd.CollectionDiscriminator.CollectionChainedExtractor<E,B>
Type Parameters:
E - The type of element.
B - The base type of the collection.
All Implemented Interfaces:
Extractor<E,java.util.List<B>>
Enclosing class:
CollectionDiscriminator<T>

protected class CollectionDiscriminator.CollectionChainedExtractor<E,B>
extends ChainedExtractor<E,java.util.List<B>,java.util.Collection<B>>

A CollectionChainedExtractor turns Collections into RandomAccess Lists.


Field Summary
 
Fields inherited from class net.sf.jagg.msd.AbstractExtractor
amIAllComplete, myExtractor, myIndex
 
Constructor Summary
CollectionDiscriminator.CollectionChainedExtractor(Extractor<E,java.util.Collection<B>> extractor)
          Create a CollectionChainedExtractor that uses the given Extractor to retrieve the collection.
 
Method Summary
 java.util.List<B> getLabel(E element)
          The label is a random access list containing all members of the collection.
 boolean isComplete(E element)
          Completeness doesn't matter for this extractor.
 
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
 
Methods inherited from interface net.sf.jagg.msd.Extractor
isAllComplete, setAllComplete
 

Constructor Detail

CollectionDiscriminator.CollectionChainedExtractor

public CollectionDiscriminator.CollectionChainedExtractor(Extractor<E,java.util.Collection<B>> extractor)
Create a CollectionChainedExtractor that uses the given Extractor to retrieve the collection.

Parameters:
extractor - An Extractor whose label is a collection.
Method Detail

getLabel

public java.util.List<B> getLabel(E element)
The label is a random access list containing all members of the collection.

Specified by:
getLabel in interface Extractor<E,java.util.List<B>>
Specified by:
getLabel in class ChainedExtractor<E,java.util.List<B>,java.util.Collection<B>>
Parameters:
element - The element.
Returns:
A random access list containing all members of the collection.

isComplete

public boolean isComplete(E element)
Completeness doesn't matter for this extractor.

Specified by:
isComplete in interface Extractor<E,java.util.List<B>>
Specified by:
isComplete in class AbstractExtractor<E,java.util.Collection<B>>
Parameters:
element - The element.
Returns:
false.


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