|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectconsciouscode.util.CompositeIterator<T>
public class CompositeIterator<T>
An Iterator that composes the contents of other iterators or
collections.
To use this, create a CompositeIterator and then call
appendElements any number of times. When this iterator is
used, the elements will all be returned in the order they were appended.
Note that this class does not implement the remove() method.
| Constructor Summary | |
|---|---|
CompositeIterator()
|
|
| Method Summary | |
|---|---|
void |
appendElements(Collection<T> collection)
Appends the given elements to the end of this iterator. |
void |
appendElements(Iterator<T> iterator)
Appends the given elements to the end of this iterator. |
boolean |
hasNext()
|
T |
next()
|
void |
remove()
Unsupported operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositeIterator()
| Method Detail |
|---|
public void appendElements(Iterator<T> iterator)
public void appendElements(Collection<T> collection)
public boolean hasNext()
hasNext in interface Iterator<T>public T next()
next in interface Iterator<T>
public void remove()
throws UnsupportedOperationException
remove in interface Iterator<T>UnsupportedOperationException - in all cases.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||