public static interface LongArray.Iterator<V> extends Iterator<V>
Map.Entry
interface.Modifier and Type | Method and Description |
---|---|
long |
getIndex()
Returns the index of the current value, which is the value returned
by the most recent call to the next method.
|
V |
getValue()
Returns the current value, which is the same value returned by the
most recent call to the next method, or the most recent
value passed to setValue if setValue were called
after the next method.
|
boolean |
hasNext()
Returns true if the iteration has more elements.
|
V |
next()
Returns the next element in the iteration.
|
void |
remove()
Removes from the underlying collection the last element returned by
the iterator (optional operation).
|
V |
setValue(V oValue)
Stores a new value at the current value index, returning the value
that was replaced.
|
forEachRemaining
boolean hasNext()
V next()
next
in interface Iterator<V>
NoSuchElementException
- iteration has no
more elementslong getIndex()
IllegalStateException
- if the next method has
not yet been called, or the remove method has
already been called after the last call to the
next method.V getValue()
IllegalStateException
- if the next method has
not yet been called, or the remove method has
already been called after the last call to the
next method.V setValue(V oValue)
oValue
- the new value to storeIllegalStateException
- if the next method has
not yet been called, or the remove method has
already been called after the last call to the
next method.void remove()
remove
in interface Iterator<V>
UnsupportedOperationException
- if the remove
operation is not supported by this IteratorIllegalStateException
- if the next method has
not yet been called, or the remove method has
already been called after the last call to the
next method.