public interface LongIterator extends Iterator<Long>
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.Iterator| Modifier and Type | Method and Description |
|---|---|
Long |
next()
Deprecated.
Please use the corresponding type-specific method instead.
|
long |
nextLong()
Returns the next element as a primitive type.
|
int |
skip(int n)
Skips the given number of elements.
|
forEachRemaining, hasNext, removelong nextLong()
Iterator.next()@Deprecated Long next()
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()