Payload - The payload type.public class FilteringIterator<Payload> extends Object implements Iterator<Payload>
FilteringIterator is an Iterator that can be wrapped around
a given Iterator and filters out values according to a given
Predicate.
Calling next() will never return a value that
doesn't satisfy the given Predicate and calling
hasNext() will never return true, unless
a value that satisfies the given Predicate is available.
| Constructor and Description |
|---|
FilteringIterator(Iterator<Payload> iterator,
net.markenwerk.commons.interfaces.Predicate<Payload> predicate)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Payload |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic FilteringIterator(Iterator<Payload> iterator, net.markenwerk.commons.interfaces.Predicate<Payload> predicate)
iterator - The Iterator, around which the new
NullFreeIterator will be wrapped.predicate - The Predicate to test every
value yielded by the given Iterator with.Copyright © 2015 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.