Payload - The payload type.public final class RemoveHandlerIterator<Payload> extends Object implements Iterator<Payload>
RemoveHandlerIterator is an Iterator that can be wrapped
around a given Iterator and intercepts every call to
remove() and calls a given Handler
for the current value.| Constructor and Description |
|---|
RemoveHandlerIterator(Iterator<? extends Payload> iterator,
Handler<Payload> removeHandler)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Payload |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic RemoveHandlerIterator(Iterator<? extends Payload> iterator, Handler<Payload> removeHandler) throws IllegalArgumentException
iterator - The Iterator, around which the new
NullFreeIterator will be wrapped.removeHandler - The Handler to be used.IllegalArgumentException - If the given Iterator is null of if the
given Handler is null.public void remove()
throws IllegalStateException
remove in interface Iterator<Payload>IllegalStateExceptionCopyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.