java.util.Iterator<K>BooleanBidirectionalIterator, BooleanListIterator, IntBidirectionalIterator, IntListIterator, ObjectBidirectionalIterator<K>, ObjectListIterator<K>AbstractBooleanBidirectionalIterator, AbstractBooleanListIterator, AbstractIntBidirectionalIterator, AbstractIntListIterator, AbstractObjectBidirectionalIterator, AbstractObjectIterator, AbstractObjectListIterator, BooleanIterators.EmptyIterator, BooleanIterators.UnmodifiableBidirectionalIterator, BooleanIterators.UnmodifiableListIterator, IntIterators.EmptyIterator, IntIterators.UnmodifiableBidirectionalIterator, IntIterators.UnmodifiableListIterator, ObjectIterators.EmptyIterator, ObjectIterators.UnmodifiableBidirectionalIterator, ObjectIterators.UnmodifiableIterator, ObjectIterators.UnmodifiableListIteratorpublic interface ObjectIterator<K>
extends java.util.Iterator<K>
Iterator; provides an additional method to avoid
(un)boxing, and the possibility to skip elements.Iterator| Modifier and Type | Method | Description |
|---|---|---|
int |
skip(int n) |
Skips the given number of elements.
|
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()