public class CompositeIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>
add(Iterator)
.
This implementation maintains a linked set of iterators which are invoked in sequence until all iterators are exhausted.
Modifier and Type | Field and Description |
---|---|
private boolean |
inUse |
private java.util.Set<java.util.Iterator<E>> |
iterators |
Constructor and Description |
---|
CompositeIterator() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.Iterator<E> iterator)
Add given iterator to this composite.
|
boolean |
hasNext() |
E |
next() |
void |
remove() |
private final java.util.Set<java.util.Iterator<E>> iterators
private boolean inUse