T - The element type of the iteratorpublic class MultiIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
Iterator that traverses a Collection of Iterators.| Modifier and Type | Field and Description |
|---|---|
private static java.util.Iterator<?> |
AT_END |
private java.util.Iterator<T> |
inner |
private java.util.Iterator<?> |
outer |
| Constructor and Description |
|---|
MultiIterator(java.util.Collection<?> collection) |
MultiIterator(java.util.Collection<T>[] collections) |
MultiIterator(java.util.Collection<T> collection,
java.lang.Object object)
Iterates over the given
Collection, appended with the given Object. |
MultiIterator(java.util.Iterator<?> iterator) |
MultiIterator(java.util.Iterator<T>[] iterators) |
MultiIterator(java.util.Iterator<T> iterator,
java.lang.Object suffix)
Iterates over the given
Iterator, appended with the given suffix. |
MultiIterator(java.lang.Object[] array) |
MultiIterator(java.lang.Object[][] arrays) |
MultiIterator(java.lang.Object object,
java.util.Collection<T> collection)
Iterates over the given
Collection, prepended with the given Object. |
MultiIterator(java.lang.Object prefix,
java.util.Iterator<T> iterator)
Iterates over the given
Iterator, prepended with the given prefix. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
private static final java.util.Iterator<?> AT_END
private final java.util.Iterator<?> outer
private java.util.Iterator<T> inner
public MultiIterator(java.util.Iterator<T>[] iterators)
iterators - An array of Iteratorspublic MultiIterator(java.util.Collection<T>[] collections)
collections - An array of Collectionspublic MultiIterator(java.lang.Object[][] arrays)
arrays - An array of arrayspublic MultiIterator(java.util.Collection<?> collection)
collection - A Collection of Collections, Iterators and/or arrayspublic MultiIterator(java.util.Iterator<?> iterator)
iterator - An iterator over Collections, Iterators and/or arrayspublic MultiIterator(java.lang.Object[] array)
array - An array of Collections, Iterators and/or arrayspublic MultiIterator(java.lang.Object object,
java.util.Collection<T> collection)
Collection, prepended with the given Object.public MultiIterator(java.util.Collection<T> collection, java.lang.Object object)
Collection, appended with the given Object.public MultiIterator(java.lang.Object prefix,
java.util.Iterator<T> iterator)
Iterator, prepended with the given prefix.public MultiIterator(java.util.Iterator<T> iterator, java.lang.Object suffix)
Iterator, appended with the given suffix.