Payload - The payload type.public final class InfixedIterator<Payload> extends Object implements Iterator<Payload>
InfixedIterator is an Iterator that can be wrapped around
a given Iterator and yields a given infix between every object
yielded by the given Iterator.
Calling IntegerArrayIterator.remove() calls Iterator.remove()
removed on the wrapped Iterator, if, and only iff, the last call to
IntegerArrayIterator.next() didn't return the given infix.
| Constructor and Description |
|---|
InfixedIterator(Iterator<? extends Payload> iterator,
Payload infix)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Payload |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic InfixedIterator(Iterator<? extends Payload> iterator, Payload infix) throws IllegalArgumentException
iterator - The Iterator, around which the new
NullFreeIterator will be wrapped.infix - The infix to be yielded.IllegalArgumentException - If the given Iterator is null.Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.