public interface IntIterator
extends Iterator<Integer>, PrimitiveIterator.OfInt
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(java.util.function.Consumer<? super Integer> action)
Deprecated.
Use specialization
forEachRemaining(IntConsumer) instead |
void |
forEachRemaining(java.util.function.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.nextInt in interface PrimitiveIterator.OfIntint element in the iterationNoSuchElementException - if the iteration has no more elements@Deprecated
void forEachRemaining(@Nonnull
java.util.function.Consumer<? super Integer> action)
forEachRemaining(IntConsumer) insteadforEachRemaining in interface Iterator<Integer>forEachRemaining in interface PrimitiveIterator.OfIntaction - the action to be performed for each elementvoid forEachRemaining(@Nonnull
java.util.function.IntConsumer action)
forEachRemaining in interface PrimitiveIterator<Integer,java.util.function.IntConsumer>forEachRemaining in interface PrimitiveIterator.OfIntaction - the action to be performed for each element