public interface ShortIterator
extends java.util.Iterator<java.lang.Short>
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.Iterator| Modifier and Type | Method and Description |
|---|---|
short |
nextShort()
Returns the next element as a primitive type.
|
int |
skip(int n)
Skips the given number of elements.
|
short nextShort()
Iterator.next()int skip(int n)
The effect of this call is exactly the same as that of calling
Iterator.next() for n times (possibly stopping if
Iterator.hasNext() becomes false).
n - the number of elements to skip.Iterator.next()