java.util.Iterator<java.lang.Long>, java.util.PrimitiveIterator<java.lang.Long,java.util.function.LongConsumer>, java.util.PrimitiveIterator.OfLongLongBidirectionalIterator, LongBigListIterator, LongListIteratorAbstractLongBidirectionalIterator, AbstractLongBigListIterator, AbstractLongIterator, AbstractLongListIterator, LongBigListIterators.BigListIteratorListIterator, LongBigListIterators.EmptyBigListIterator, LongBigListIterators.UnmodifiableBigListIterator, LongIterators.EmptyIterator, LongIterators.UnmodifiableBidirectionalIterator, LongIterators.UnmodifiableIterator, LongIterators.UnmodifiableListIteratorpublic interface LongIterator
extends java.util.PrimitiveIterator.OfLong
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.Iterator| Modifier and Type | Method | Description |
|---|---|---|
default void |
forEachRemaining(java.util.function.Consumer<? super java.lang.Long> action) |
Deprecated.
Please use the corresponding type-specific method instead.
|
default java.lang.Long |
next() |
Deprecated.
Please use the corresponding type-specific method instead.
|
long |
nextLong() |
Returns the next element as a primitive type.
|
default int |
skip(int n) |
Skips the given number of elements.
|
long nextLong()
nextLong in interface java.util.PrimitiveIterator.OfLongIterator.next()@Deprecated default java.lang.Long next()
next in interface java.util.Iterator<java.lang.Long>next in interface java.util.PrimitiveIterator.OfLong@Deprecated default void forEachRemaining(java.util.function.Consumer<? super java.lang.Long> action)
forEachRemaining in interface java.util.Iterator<java.lang.Long>forEachRemaining in interface java.util.PrimitiveIterator.OfLongdefault int skip(int n)
The effect of this call is exactly the same as that of calling
next() for n times (possibly stopping if Iterator.hasNext()
becomes false).
n - the number of elements to skip.Iterator.next()