public abstract class IntFindingIterator extends AbstractIntIterator
IntIterator.Single
Modifier and Type | Field and Description |
---|---|
protected int |
myNext |
EMPTY
Constructor and Description |
---|
IntFindingIterator() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
findNext()
In this method
myNext should be assigned the next value. |
boolean |
hasNext() |
boolean |
hasValue() |
IntIterator |
next() |
int |
value() |
iterator, nextValue, remove
protected abstract boolean findNext() throws java.util.ConcurrentModificationException
myNext
should be assigned the next value.myNext
, otherwise falsejava.util.ConcurrentModificationException
public final boolean hasNext() throws java.util.ConcurrentModificationException
true
if next call to Iterator.next()
or IntIterator.nextValue()
won't throw NoSuchElementExceptionjava.util.ConcurrentModificationException
public IntIterator next() throws java.util.ConcurrentModificationException, java.util.NoSuchElementException
java.util.ConcurrentModificationException
java.util.NoSuchElementException
public int value() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if iterator has never been advanced
(Iterator.next()
or IntIterator.nextValue()
have never been called)public boolean hasValue()
false
if this iterator has never been advanced.
In other words, returns false
if the subsequent call to IntIterator.value()
will throw NoSuchElementException, otherwise true
.