Package it.unimi.dsi.fastutil.shorts
Class ShortIterators.EmptyIterator
java.lang.Object
it.unimi.dsi.fastutil.shorts.ShortIterators.EmptyIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Short>,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Short>,it.unimi.dsi.fastutil.objects.ObjectIterator<Short>,ShortBidirectionalIterator,it.unimi.dsi.fastutil.shorts.ShortIterator,ShortListIterator,Serializable,Cloneable,Iterator<Short>,ListIterator<Short>,PrimitiveIterator<Short,it.unimi.dsi.fastutil.shorts.ShortConsumer>
- Enclosing class:
ShortIterators
public static class ShortIterators.EmptyIterator
extends Object
implements ShortListIterator, Serializable, Cloneable
A class returning no elements and a type-specific iterator interface.
This class may be useful to implement your own in case you subclass a type-specific iterator.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintback(int n) Moves back for the given number of elements.clone()voidforEachRemaining(it.unimi.dsi.fastutil.shorts.ShortConsumer action) voidforEachRemaining(Consumer<? super Short> action) Deprecated.booleanhasNext()booleanintshortintshortReturns the previous element as a primitive type.intskip(int n) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterator
forEachRemaining
-
Constructor Details
-
EmptyIterator
protected EmptyIterator()
-
-
Method Details
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Short>- Specified by:
hasPreviousin interfaceListIterator<Short>
-
nextShort
public short nextShort()- Specified by:
nextShortin interfaceit.unimi.dsi.fastutil.shorts.ShortIterator
-
previousShort
public short previousShort()Description copied from interface:ShortBidirectionalIteratorReturns the previous element as a primitive type.- Specified by:
previousShortin interfaceShortBidirectionalIterator- Returns:
- the previous element in the iteration.
- See Also:
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<Short>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<Short>
-
skip
public int skip(int n) Description copied from interface:ShortBidirectionalIterator- Specified by:
skipin interfaceit.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Short>- Specified by:
skipin interfaceit.unimi.dsi.fastutil.objects.ObjectIterator<Short>- Specified by:
skipin interfaceShortBidirectionalIterator- Specified by:
skipin interfaceit.unimi.dsi.fastutil.shorts.ShortIterator
-
back
public int back(int n) Description copied from interface:ShortBidirectionalIteratorMoves back for the given number of elements.The effect of this call is exactly the same as that of calling
ShortBidirectionalIterator.previous()forntimes (possibly stopping ifBidirectionalIterator.hasPrevious()becomes false).- Specified by:
backin interfaceit.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Short>- Specified by:
backin interfaceShortBidirectionalIterator- Parameters:
n- the number of elements to skip back.- Returns:
- the number of elements actually skipped.
- See Also:
-
forEachRemaining
public void forEachRemaining(it.unimi.dsi.fastutil.shorts.ShortConsumer action) - Specified by:
forEachRemainingin interfacePrimitiveIterator<Short,it.unimi.dsi.fastutil.shorts.ShortConsumer> - Specified by:
forEachRemainingin interfaceit.unimi.dsi.fastutil.shorts.ShortIterator
-
forEachRemaining
Deprecated.- Specified by:
forEachRemainingin interfaceIterator<Short>- Specified by:
forEachRemainingin interfaceit.unimi.dsi.fastutil.shorts.ShortIterator
-
clone
-