public class FilteringIterator<E> extends Object implements Iterator<E>
Iterator
implementation returned by Filter.iterator()
.Modifier and Type | Method and Description |
---|---|
Class<E> |
getFilterType() |
boolean |
hasNext() |
E |
next() |
void |
remove()
Removes the current element from the underlying collection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public void remove()
next()
. If you
call hasNext()
after next()
but before
remove()
, we must throw an IllegalStateException
because
the underlying Iterator
has already iterated further.remove
in interface Iterator<E>
UnsupportedOperationException
- if the underlying collection's
iterator does not support removeIllegalStateException
- if you have called a method of this iterator after the last
successful next()
operationIterator.remove()