public class FlatIterator<E extends Traversable> extends IRIterator<E>
| Constructor and Description |
|---|
FlatIterator(Traversable parent)
Creates a new iterator with the specified traversable object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Traversable t)
Adds an object after the last object that was returned
by next or previous.
|
java.util.List |
getList(java.lang.Class<? extends Traversable> c)
Returns a linked list of objects of Class c in the IR
|
java.util.Set |
getSet(java.lang.Class<? extends Traversable> c)
Returns a set of objects of Class c in the IR
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
boolean |
hasPrevious()
Checks if the iterator has previous element
|
E |
next()
Returns the next element in the iteration.
|
E |
previous()
Returns the previous element of the current position
|
void |
remove()
Removes the last object that was returned by next or previous.
|
void |
reset()
Moves the iterator back to the beginning of the sequence.
|
next, next, nextExceptpublic FlatIterator(Traversable parent)
parent - The parent of the children to visit.public void add(Traversable t)
t - The object to add.public boolean hasNext()
IRIteratorhasNext in interface java.util.Iterator<E extends Traversable>hasNext in class IRIterator<E extends Traversable>public boolean hasPrevious()
public E next()
IRIteratornext in interface java.util.Iterator<E extends Traversable>next in class IRIterator<E extends Traversable>public E previous()
public void remove()
remove in interface java.util.Iterator<E extends Traversable>remove in class IRIterator<E extends Traversable>public void reset()
IRIteratorreset in class IRIterator<E extends Traversable>public java.util.List getList(java.lang.Class<? extends Traversable> c)
public java.util.Set getSet(java.lang.Class<? extends Traversable> c)