public abstract class FilterIterator<T> extends Object implements Iterator<T>
FilterIterator
is an abstract base class which is useful for
implementors of Iterator
which filter an existing iterator.
Modifier and Type | Field and Description |
---|---|
protected Iterator<T> |
proxy
Deprecated.
|
Constructor and Description |
---|
FilterIterator(Iterator<T> proxy)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected T |
findNext()
Deprecated.
|
boolean |
hasNext()
Deprecated.
|
protected abstract boolean |
matches(T element)
Deprecated.
Filter method to perform some matching on the given element.
|
T |
next()
Deprecated.
|
void |
remove()
Deprecated.
Always throws UnsupportedOperationException as this class does look-ahead
with its internal iterator.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public T next() throws NoSuchElementException
next
in interface Iterator<T>
NoSuchElementException
public void remove()
remove
in interface Iterator<T>
UnsupportedOperationException
- alwaysprotected abstract boolean matches(T element)
element
- DOCUMENT ME!protected T findNext()
Copyright © 2020. All rights reserved.