Package it.unimi.dsi.fastutil.shorts
Class ShortIterators.UnmodifiableIterator
java.lang.Object
it.unimi.dsi.fastutil.shorts.ShortIterators.UnmodifiableIterator
- All Implemented Interfaces:
ShortIterator
,Iterator<Short>
,PrimitiveIterator<Short,
ShortConsumer>
- Enclosing class:
ShortIterators
An unmodifiable wrapper class for iterators.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
forEachRemaining
(ShortConsumer action) Performs the given action for each remaining element until all elements have been processed or the action throws an exception.void
forEachRemaining
(Consumer<? super Short> action) Deprecated.boolean
hasNext()
short
Returns the next element as a primitive type.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterator
forEachRemaining, next, skip
-
Constructor Details
-
UnmodifiableIterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
nextShort
public short nextShort()Description copied from interface:ShortIterator
Returns the next element as a primitive type.- Specified by:
nextShort
in interfaceShortIterator
- Returns:
- the next element in the iteration.
- See Also:
-
forEachRemaining
Description copied from interface:ShortIterator
Performs the given action for each remaining element until all elements have been processed or the action throws an exception.- Specified by:
forEachRemaining
in interfacePrimitiveIterator<Short,
ShortConsumer> - Specified by:
forEachRemaining
in interfaceShortIterator
- Parameters:
action
- the action to be performed for each element.- See Also:
-
forEachRemaining
Deprecated.Description copied from interface:ShortIterator
- Specified by:
forEachRemaining
in interfaceIterator<Short>
- Specified by:
forEachRemaining
in interfaceShortIterator
-