Iterator<T>
ElementIterator
, ElementNameIterator
, ElementQNameIterator
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.
Constructor | Description |
---|---|
FilterIterator(Iterator<T> proxy) |
Deprecated.
|
Modifier and Type | Method | 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.
|
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()