public static class IntIterator.Single extends AbstractIntIteratorWithFlag
IntIterator.Single
myIterated
EMPTY
Constructor and Description |
---|
IntIterator.Single(int value) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
protected void |
nextImpl()
Called before any call to
AbstractIntIteratorWithFlag.valueImpl() , should be used to either initialize the state or advance the iterator. |
protected int |
valueImpl()
Called after any call to
AbstractIntIteratorWithFlag.nextImpl() , should return value of iterator. |
hasValue, next, value
iterator, nextValue, remove
public boolean hasNext()
true
if next call to Iterator.next()
or IntIterator.nextValue()
won't throw NoSuchElementExceptionprotected void nextImpl() throws java.util.NoSuchElementException
AbstractIntIteratorWithFlag
AbstractIntIteratorWithFlag.valueImpl()
, should be used to either initialize the state or advance the iterator.nextImpl
in class AbstractIntIteratorWithFlag
java.util.NoSuchElementException
protected int valueImpl() throws java.util.NoSuchElementException
AbstractIntIteratorWithFlag
AbstractIntIteratorWithFlag.nextImpl()
, should return value of iterator.
Can safely assume that the iterator is initialized.valueImpl
in class AbstractIntIteratorWithFlag
java.util.NoSuchElementException