@Mutable public class FilteringIterator<ELEMENT> extends SingleIteratorBasedIterator<ELEMENT,ELEMENT>
| Modifier and Type | Field and Description |
|---|---|
protected @Nonnull FailablePredicate<? super ELEMENT,?> |
predicate |
primaryIterator| Modifier | Constructor and Description |
|---|---|
protected |
FilteringIterator(@Nonnull Iterator<? extends ELEMENT> primaryIterator,
@Nonnull FailablePredicate<? super ELEMENT,?> predicate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
ELEMENT |
next() |
static <ELEMENT> @Nonnull FilteringIterator<ELEMENT> |
with(@Nonnull Iterator<? extends ELEMENT> iterator,
@Nonnull FailablePredicate<? super ELEMENT,?> predicate)
Returns a new filtering iterator that iterates over the elements of the given iterator that fulfill the given predicate.
|
removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining@Nonnull protected final @Nonnull FailablePredicate<? super ELEMENT,?> predicate
@Pure @Capturable @Nonnull public static <ELEMENT> @Nonnull FilteringIterator<ELEMENT> with(@Captured @Nonnull @Nonnull Iterator<? extends ELEMENT> iterator, @Nonnull @Nonnull FailablePredicate<? super ELEMENT,?> predicate)
@Pure public boolean hasNext()
Copyright © 2017. All rights reserved.