Payload - The payload type.public final class FilteredIterable<Payload> extends Object implements Iterable<Payload>
FilteredIterable 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
FilteredIterator.
| Constructor and Description |
|---|
FilteredIterable(Iterable<? extends Payload> iterable,
Predicate<Payload> predicate)
Creates a new
FilteredIterable from the given Iterable. |
FilteredIterable(Iterable<? extends Payload> iterable,
Predicate<Payload> predicate,
boolean invertPredicate)
Creates a new
FilteredIterable from the given Iterable. |
| Modifier and Type | Method and Description |
|---|---|
FilteredIterator<Payload> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic FilteredIterable(Iterable<? extends Payload> iterable, Predicate<Payload> predicate) throws IllegalArgumentException
FilteredIterable from the given Iterable.iterable - The Iterable, around which the new
FilteredIterable 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 FilteredIterable(Iterable<? extends Payload> iterable, Predicate<Payload> predicate, boolean invertPredicate) throws IllegalArgumentException
FilteredIterable from the given Iterable.iterable - The Iterable, around which the new
FilteredIterable 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 FilteredIterator<Payload> iterator()
Copyright © 2015–2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.