edu.indiana.iucbrf.feature.featurespec
Class AbstractFSCIterator
java.lang.Object
edu.indiana.iucbrf.feature.featurespec.AbstractFSCIterator
- All Implemented Interfaces:
- java.util.Iterator
- Direct Known Subclasses:
- FSCIterator
public abstract class AbstractFSCIterator
- extends java.lang.Object
- implements java.util.Iterator
A customizable (via the iteratorType parameter of the constructor, and subclassing)
iterator of feature spec collections. The collections can be iterated for keys,
specs, or entries (both keys and corresponding specs). The major piece of
customization comes from overriding shouldVisit(). This allows the designer
to avoid visiting a feature spec, under certain conditions.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SPEC_ITERATOR
public static final int SPEC_ITERATOR
- See Also:
- Constant Field Values
KEY_ITERATOR
public static final int KEY_ITERATOR
- See Also:
- Constant Field Values
ENTRY_ITERATOR
public static final int ENTRY_ITERATOR
- See Also:
- Constant Field Values
iteratorType
protected int iteratorType
featureSpecCollection
protected FeatureSpecCollection featureSpecCollection
entryIter
protected java.util.Iterator entryIter
nextEntry
protected java.util.Map.Entry nextEntry
AbstractFSCIterator
public AbstractFSCIterator(FeatureSpecCollection featureSpecCollection,
int iteratorType)
- Creates a new instance of FeatureSpecIterator
AbstractFSCIterator
public AbstractFSCIterator(FeatureSpecCollection featureSpecCollection,
int iteratorType,
java.util.Iterator orderedAllEntryIterator)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next
in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator
shouldVisit
public abstract boolean shouldVisit(FeatureKey featureKey)