com.koloboke.collect
Interface ShortIterator

All Superinterfaces:
Iterator<Short>

public interface ShortIterator
extends Iterator<Short>

Primitive specialization of Iterator<Short>.

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:
ShortCollection.iterator()

Method Summary
 void forEachRemaining(ShortConsumer action)
          Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
 short nextShort()
          Returns the next short element in the iteration.
 
Methods inherited from interface Iterator
hasNext, next, remove
 

Method Detail

nextShort

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

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

forEachRemaining

void forEachRemaining(@Nonnull
                      ShortConsumer 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