Package it.unimi.dsi.fastutil.longs
Class LongIterators.EmptyIterator
java.lang.Object
it.unimi.dsi.fastutil.longs.LongIterators.EmptyIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Long>,LongBidirectionalIterator,it.unimi.dsi.fastutil.longs.LongIterator,LongListIterator,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Long>,it.unimi.dsi.fastutil.objects.ObjectIterator<Long>,Serializable,Cloneable,Iterator<Long>,ListIterator<Long>,PrimitiveIterator<Long,,LongConsumer> PrimitiveIterator.OfLong
- Enclosing class:
LongIterators
public static class LongIterators.EmptyIterator
extends Object
implements LongListIterator, 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(Consumer<? super Long> action) Deprecated.voidforEachRemaining(LongConsumer action) booleanhasNext()booleanintlongnextLong()intlongReturns 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.longs.LongIterator
forEachRemaining
-
Constructor Details
-
EmptyIterator
protected EmptyIterator()
-
-
Method Details
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Long>- Specified by:
hasPreviousin interfaceListIterator<Long>
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceit.unimi.dsi.fastutil.longs.LongIterator- Specified by:
nextLongin interfacePrimitiveIterator.OfLong
-
previousLong
public long previousLong()Description copied from interface:LongBidirectionalIteratorReturns the previous element as a primitive type.- Specified by:
previousLongin interfaceLongBidirectionalIterator- Returns:
- the previous element in the iteration.
- See Also:
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<Long>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<Long>
-
skip
public int skip(int n) Description copied from interface:LongBidirectionalIterator- Specified by:
skipin interfaceLongBidirectionalIterator- Specified by:
skipin interfaceit.unimi.dsi.fastutil.longs.LongIterator- Specified by:
skipin interfaceit.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Long>- Specified by:
skipin interfaceit.unimi.dsi.fastutil.objects.ObjectIterator<Long>
-
back
public int back(int n) Description copied from interface:LongBidirectionalIteratorMoves back for the given number of elements.The effect of this call is exactly the same as that of calling
LongBidirectionalIterator.previous()forntimes (possibly stopping ifBidirectionalIterator.hasPrevious()becomes false).- Specified by:
backin interfaceLongBidirectionalIterator- Specified by:
backin interfaceit.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Long>- Parameters:
n- the number of elements to skip back.- Returns:
- the number of elements actually skipped.
- See Also:
-
forEachRemaining
- Specified by:
forEachRemainingin interfacePrimitiveIterator<Long,LongConsumer> - Specified by:
forEachRemainingin interfacePrimitiveIterator.OfLong
-
forEachRemaining
Deprecated.- Specified by:
forEachRemainingin interfaceIterator<Long>- Specified by:
forEachRemainingin interfaceit.unimi.dsi.fastutil.longs.LongIterator- Specified by:
forEachRemainingin interfacePrimitiveIterator.OfLong
-
clone
-