T
- The type of elements returned by this iterator.@NotThreadSafe public abstract class FilteringIterator<T> extends Object implements Iterator<T>
accept(Object)
method.Modifier | Constructor and Description |
---|---|
protected |
FilteringIterator(Iterable<T> iterable)
Constructs a new filtering iterator which filters the given iterable.
|
protected |
FilteringIterator(Iterator<T> iterator)
Constructs a new filtering iterator which filters the given iterator.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
accept(T element)
Returns
true if and only if this filtering iterator accepts the
given element. |
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected FilteringIterator(Iterable<T> iterable)
iterable
- the iterable to filter.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.