public interface LongIterator extends Iterator<Long>
Iterator
<
Long
>
.
See the comparison of iteration ways in the library.
Iterators of updatable and immutable collections don't support Iterator.remove()
operation. More about mutability profiles.
LongCollection.iterator()
Modifier and Type | Method and Description |
---|---|
void |
forEachRemaining(LongConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
long |
nextLong()
Returns the next
long element in the iteration. |
long nextLong()
long
element in the iteration. This is a primitive specialization
of the Iterator.next()
method.long
element in the iterationNoSuchElementException
- if the iteration has no more elementsvoid forEachRemaining(@Nonnull LongConsumer action)
action
- the action to be performed for each element