public class CompositeIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.util.Iterator<T>> |
allIterators |
protected int |
currentIterator |
Constructor and Description |
---|
CompositeIterator()
Creates new composite iterator.
|
CompositeIterator(java.util.Iterator<T>... iterators)
Creates new composite iterator with provided iterators.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.Iterator<T> iterator)
Adds an iterator to this composite.
|
boolean |
hasNext()
Returns
true if next element is available. |
T |
next() |
void |
remove() |
protected final java.util.List<java.util.Iterator<T>> allIterators
protected int currentIterator
public CompositeIterator()
add(Iterator)
method.public CompositeIterator(java.util.Iterator<T>... iterators)
public void add(java.util.Iterator<T> iterator)
public boolean hasNext()
true
if next element is available.hasNext
in interface java.util.Iterator<T>
public void remove()
remove
in interface java.util.Iterator<T>
Copyright © 2003-present Jodd Team