private class ConverterFilter.FilterIterator
extends java.lang.Object
implements java.util.Iterator<C>
Modifier and Type | Field and Description |
---|---|
private static int |
AT_END |
private static int |
AWAITING_CONSUMER |
private T |
foundItem |
private static int |
ITERATING |
private java.util.Iterator<T> |
iterator |
private int |
state |
Modifier | Constructor and Description |
---|---|
private |
FilterIterator(java.util.Iterator<T> iterator) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
private boolean |
moveToNext()
Advances the underlying iterator and searches for the next passing item.
|
C |
next() |
void |
remove() |
private static final int AT_END
private static final int AWAITING_CONSUMER
private T foundItem
private static final int ITERATING
private java.util.Iterator<T> iterator
private int state
private FilterIterator(java.util.Iterator<T> iterator)
public boolean hasNext()
hasNext
in interface java.util.Iterator<C>
private boolean moveToNext()
The underlying iterator is only advanced if the previously found item has been consumed (by a call to next() function). This means that calls to hasNext() will only cause the iterator to advance on the first call, and all subsequent calls will NOT advance the iterator until next() has been called.
public void remove()
remove
in interface java.util.Iterator<C>