public class PostOrderIterator<E extends Traversable> extends IRIterator<E>
| Constructor and Description |
|---|
PostOrderIterator(Traversable root)
Creates a new iterator with the specified root object.
|
PostOrderIterator(Traversable root,
java.lang.Class<? extends Traversable>[] pruned_on)
Creates a new iterator with the specified root object and the array of
classes that needs to be pruned on.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Unlike the reset method, clear method also clears the
pruned types.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
E |
next()
Returns the next element in the iteration.
|
void |
pruneOn(java.lang.Class<? extends Traversable> c)
Disables traversal from an object having the specified type.
|
void |
reset()
Resets the iterator by setting the current position to the root object.
|
next, next, nextExcept, removepublic PostOrderIterator(Traversable root)
root - The root object for the traversal.public PostOrderIterator(Traversable root, java.lang.Class<? extends Traversable>[] pruned_on)
root - The root object for the traversal.pruned_on - The list of object types to be pruned on.public boolean hasNext()
IRIteratorhasNext in interface java.util.Iterator<E extends Traversable>hasNext in class IRIterator<E extends Traversable>public E next()
IRIteratornext in interface java.util.Iterator<E extends Traversable>next in class IRIterator<E extends Traversable>public void pruneOn(java.lang.Class<? extends Traversable> c)
c - the object type to be pruned on.public void reset()
reset in class IRIterator<E extends Traversable>public void clear()