Payload - The payload type.public final class LookAheadIterator<Payload> extends AbstractProtectedIterator<LookAhead<Payload>>
LookAheadIterator is an ProtectedIterator that can be
wrapped around a given Iterator and yields a LookAhead
container that holds the current and the next payload value of the given
Iterator.| Constructor and Description |
|---|
LookAheadIterator(Iterator<? extends Payload> iterator)
Creates a new
LookAheadIterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
LookAhead<Payload> |
next() |
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic LookAheadIterator(Iterator<? extends Payload> iterator) throws IllegalArgumentException
LookAheadIterator.iterator - The Iterator to iterate over.IllegalArgumentException - If the given Iterator is null.public boolean hasNext()
public LookAhead<Payload> next() throws NoSuchElementException
NoSuchElementExceptionCopyright © 2015–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.