public class FilterIterator<T> extends WrappedIterator<T>
| Constructor and Description |
|---|
FilterIterator(Predicate<T> fl,
Iterator<T> e)
Initialises a FilterIterator with its filter and base.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Answer true iff there is at least one more acceptable object.
|
T |
next()
Answer the next acceptable object from the base iterator.
|
void |
remove()
Remove the current member from the underlying iterator.
|
close, close, create, createIteratorIterator, createNoRemove, forTestingOnly_getBaseandThen, andThen, asList, asSet, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSetequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextOptionalforEachRemainingpublic boolean hasNext()
current, sets canRemove
false; answer preserved in `hasCurrent`]public void remove()
Licenced under the Apache License, Version 2.0