public interface LongIterator extends PrimitiveIterator.OfLong
Iterator; provides an additional method to avoid (un)boxing, and
the possibility to skip elements.IteratorPrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Modifier and Type | Method and Description |
|---|---|
default void |
forEachRemaining(Consumer<? super Long> action)
Deprecated.
Please use the corresponding type-specific method instead.
|
default 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.
|
forEachRemaininglong nextLong()
nextLong in interface PrimitiveIterator.OfLongIterator.next()@Deprecated default Long next()
next in interface Iterator<Long>next in interface PrimitiveIterator.OfLong@Deprecated default void forEachRemaining(Consumer<? super Long> action)
forEachRemaining in interface Iterator<Long>forEachRemaining in interface 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()Copyright © 2020. All rights reserved.