Payload - The payload type.public final class CombinedIterator<Payload> extends Object implements Iterator<Payload>
CombinedIterator is an Iterator that wraps around a
sequence of given Iterators and combines them into a single
Iterator by iterating over all given Iterators in
the order they were given.| Constructor and Description |
|---|
CombinedIterator(Iterable<? extends Iterator<? extends Payload>> iterators)
Creates a new
CombinedIterator. |
CombinedIterator(Iterator<? extends Iterator<? extends Payload>> iterators)
Creates a new
CombinedIterator. |
CombinedIterator(Iterator<? extends Payload>... iterators)
Creates a new
CombinedIterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Payload |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic CombinedIterator(Iterator<? extends Payload>... iterators) throws IllegalArgumentException
CombinedIterator.iterators - The Iterators to iterate over.IllegalArgumentException - If the given sequence of Iterators is
null.public CombinedIterator(Iterable<? extends Iterator<? extends Payload>> iterators) throws IllegalArgumentException
CombinedIterator.iterators - The Iterators to iterate over.IllegalArgumentException - If the given Iterable of Iterators
is null.public CombinedIterator(Iterator<? extends Iterator<? extends Payload>> iterators) throws IllegalArgumentException
CombinedIterator.iterators - The Iterators to iterate over.IllegalArgumentException - If the given Iterator of Iterators
is null.public Payload next() throws NoSuchElementException
next in interface Iterator<Payload>NoSuchElementExceptionpublic void remove()
throws IllegalStateException,
UnsupportedOperationException
remove in interface Iterator<Payload>IllegalStateExceptionUnsupportedOperationExceptionCopyright © 2015–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.