edu.indiana.iucbrf.feature.featurespec
Class FSCIterator

java.lang.Object
  extended by edu.indiana.iucbrf.feature.featurespec.AbstractFSCIterator
      extended by edu.indiana.iucbrf.feature.featurespec.FSCIterator
All Implemented Interfaces:
java.util.Iterator

public class FSCIterator
extends AbstractFSCIterator

This implementation of AbstractFSCIterator allows the user to specify whether to require the specs to be printable, and whether to require them to be full (non-subfeatures) before they are returned by the iterator. Note that a subfeature is a feature that is part of a TableFeature. A "full" feature is not part of a TableFeature.

Note: If an iterator through all feature specs is desired, where even unprintable and non-full features should be returned, then use the orderedAll___Iterator() methods for greater efficiency.


Field Summary
protected  boolean requireFull
           
protected  boolean requirePrintable
           
 
Fields inherited from class edu.indiana.iucbrf.feature.featurespec.AbstractFSCIterator
ENTRY_ITERATOR, entryIter, featureSpecCollection, iteratorType, KEY_ITERATOR, nextEntry, SPEC_ITERATOR
 
Constructor Summary
FSCIterator(FeatureSpecCollection featureSpecCollection, int iteratorType, boolean requirePrintable, boolean requireFull)
          Creates a new instance of FSCIterator If requirePrintable is true, then only printable features will be returned by next() in iteration.
FSCIterator(FeatureSpecCollection featureSpecCollection, int iteratorType, java.util.Iterator orderedAllEntryIterator, boolean requirePrintable, boolean requireFull)
           
 
Method Summary
 boolean shouldVisit(FeatureKey featureKey)
           
 
Methods inherited from class edu.indiana.iucbrf.feature.featurespec.AbstractFSCIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requirePrintable

protected boolean requirePrintable

requireFull

protected boolean requireFull
Constructor Detail

FSCIterator

public FSCIterator(FeatureSpecCollection featureSpecCollection,
                   int iteratorType,
                   boolean requirePrintable,
                   boolean requireFull)
Creates a new instance of FSCIterator If requirePrintable is true, then only printable features will be returned by next() in iteration. If requireFull is true, then only full features will be returned by next() in iteration.


FSCIterator

public FSCIterator(FeatureSpecCollection featureSpecCollection,
                   int iteratorType,
                   java.util.Iterator orderedAllEntryIterator,
                   boolean requirePrintable,
                   boolean requireFull)
Method Detail

shouldVisit

public boolean shouldVisit(FeatureKey featureKey)
Specified by:
shouldVisit in class AbstractFSCIterator