com.koloboke.collect
Interface IntIterator

All Superinterfaces:
Iterator<Integer>

public interface IntIterator
extends Iterator<Integer>

Primitive specialization of 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.

See Also:
IntCollection.iterator()

Method Summary
 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.
 
Methods inherited from interface Iterator
hasNext, next, remove
 

Method Detail

nextInt

int nextInt()
Returns the next int element in the iteration. This is a primitive specialization of the Iterator.next() method.

Returns:
the next int element in the iteration
Throws:
NoSuchElementException - if the iteration has no more elements

forEachRemaining

void forEachRemaining(@Nonnull
                      IntConsumer action)
Performs the given action for each remaining element until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

Parameters:
action - the action to be performed for each element