Package it.unimi.dsi.fastutil.longs
Interface LongIterator
-
- All Superinterfaces:
Iterator<Long>,PrimitiveIterator<Long,LongConsumer>,PrimitiveIterator.OfLong
- All Known Subinterfaces:
LongBidirectionalIterator,LongBigListIterator,LongListIterator
- All Known Implementing Classes:
AbstractLongBidirectionalIterator,AbstractLongBigListIterator,AbstractLongIterator,AbstractLongListIterator,LongBigListIterators.BigListIteratorListIterator,LongBigListIterators.EmptyBigListIterator,LongBigListIterators.UnmodifiableBigListIterator,LongIterators.EmptyIterator,LongIterators.UnmodifiableBidirectionalIterator,LongIterators.UnmodifiableIterator,LongIterators.UnmodifiableListIterator
public interface LongIterator extends PrimitiveIterator.OfLong
A type-specificIterator; provides an additional method to avoid (un)boxing, and the possibility to skip elements.- See Also:
Iterator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
-
-
Method Summary
Modifier and Type Method Description default voidforEachRemaining(Consumer<? super Long> action)Deprecated.Please use the corresponding type-specific method instead.default Longnext()Deprecated.Please use the corresponding type-specific method instead.longnextLong()Returns the next element as a primitive type.default intskip(int n)Skips the given number of elements.-
Methods inherited from interface java.util.PrimitiveIterator.OfLong
forEachRemaining
-
-
-
-
Method Detail
-
nextLong
long nextLong()
Returns the next element as a primitive type.- Specified by:
nextLongin interfacePrimitiveIterator.OfLong- Returns:
- the next element in the iteration.
- See Also:
Iterator.next()
-
next
@Deprecated default Long next()
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
nextin interfaceIterator<Long>- Specified by:
nextin interfacePrimitiveIterator.OfLong
-
forEachRemaining
@Deprecated default void forEachRemaining(Consumer<? super Long> action)
Deprecated.Please use the corresponding type-specific method instead.- Specified by:
forEachRemainingin interfaceIterator<Long>- Specified by:
forEachRemainingin interfacePrimitiveIterator.OfLong
-
skip
default int skip(int n)
Skips the given number of elements.The effect of this call is exactly the same as that of calling
next()forntimes (possibly stopping ifIterator.hasNext()becomes false).- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-
-