Payload - The payload type.public final class FilteringIterable<Payload> extends Object implements Iterable<Payload>
FilteringIterable is an Iterable that can be wrapped around
a given Iterable and generates Iterators that
filters out values according to a given Predicate.
Calling iterator() creates an instance of
FilteringIterator.
| Constructor and Description |
|---|
FilteringIterable(Iterable<? extends Payload> iterable,
Predicate<Payload> predicate)
Creates a new
FilteringIterable from the given Iterable. |
FilteringIterable(Iterable<? extends Payload> iterable,
Predicate<Payload> predicate,
boolean invertPredicate)
Creates a new
FilteringIterable from the given Iterable. |
| Modifier and Type | Method and Description |
|---|---|
FilteringIterator<Payload> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic FilteringIterable(Iterable<? extends Payload> iterable, Predicate<Payload> predicate) throws IllegalArgumentException
FilteringIterable from the given Iterable.iterable - The Iterable, around which the new
FilteringIterable will be wrapped.predicate - The Predicate to test
every value yielded by the given Iterable with.IllegalArgumentException - If the given Iterable is null or if the
given Predicate is null.public FilteringIterable(Iterable<? extends Payload> iterable, Predicate<Payload> predicate, boolean invertPredicate) throws IllegalArgumentException
FilteringIterable from the given Iterable.iterable - The Iterable, around which the new
FilteringIterable will be wrapped.predicate - The Predicate to test
every value yielded by the given Iterable with.invertPredicate - Whether to invert the test result and yield values that don't
satisfy the given Predicate.IllegalArgumentException - If the given Iterable is null or if the
given Predicate is null.public FilteringIterator<Payload> iterator()
Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.