public interface IntIterator extends Iterator<Integer>
Iterator
<
Integer
>
.
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.
IntCollection.iterator()
Modifier and Type | Method and Description |
---|---|
void |
forEachRemaining(IntConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
int |
nextInt()
Returns the next
int element in the iteration. |
int nextInt()
int
element in the iteration. This is a primitive specialization
of the Iterator.next()
method.int
element in the iterationNoSuchElementException
- if the iteration has no more elementsvoid forEachRemaining(@Nonnull IntConsumer action)
action
- the action to be performed for each element