Payload - The payload type.public final class ProtectingIterator<Payload> extends Object implements ProtectedIterator<Payload>
ProtectingIterator is an ProtectedIterator that can be
wrapped around a given Iterator and guarantees that every call to
Iterator.remove() throws an
UnsupportedOperationException and doesn't alter the underlying
Iterator.| Constructor and Description |
|---|
ProtectingIterator(Iterator<? extends Payload> iterator)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Payload |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic ProtectingIterator(Iterator<? extends Payload> iterator) throws IllegalArgumentException
iterator - The Iterator, around which the new
NullFreeIterator will be wrapped.IllegalArgumentException - If the given Iterator is null.Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.