Interface ObjectIterator<K>
-
- All Superinterfaces:
Iterator<K>
- All Known Subinterfaces:
CharBidirectionalIterator
,CharListIterator
,ObjectBidirectionalIterator<K>
,ObjectListIterator<K>
- All Known Implementing Classes:
AbstractCharBidirectionalIterator
,AbstractCharListIterator
,AbstractObjectBidirectionalIterator
,AbstractObjectIterator
,AbstractObjectListIterator
,CharIterators.EmptyIterator
,CharIterators.UnmodifiableBidirectionalIterator
,CharIterators.UnmodifiableListIterator
,ObjectIterators.EmptyIterator
,ObjectIterators.UnmodifiableBidirectionalIterator
,ObjectIterators.UnmodifiableIterator
,ObjectIterators.UnmodifiableListIterator
public interface ObjectIterator<K> extends Iterator<K>
A type-specificIterator
; provides an additional method to avoid (un)boxing, and the possibility to skip elements.- See Also:
Iterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
skip(int n)
Skips the given number of elements.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
skip
int skip(int n)
Skips the given number of elements.The effect of this call is exactly the same as that of calling
Iterator.next()
forn
times (possibly stopping ifIterator.hasNext()
becomes false).- Parameters:
n
- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
Iterator.next()
-
-