Package it.unimi.dsi.fastutil.objects
Interface ObjectBidirectionalIterator<K>
- All Superinterfaces:
BidirectionalIterator<K>,Iterator<K>,ObjectIterator<K>
A type-specific bidirectional iterator; provides an additional method to avoid (un)boxing,
and the possibility to skip elements backwards.
- See Also:
-
Method Summary
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious, previousMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
back
default int back(int n) Moves back for the given number of elements.The effect of this call is exactly the same as that of calling
BidirectionalIterator.previous()forntimes (possibly stopping ifBidirectionalIterator.hasPrevious()becomes false).- Parameters:
n- the number of elements to skip back.- Returns:
- the number of elements actually skipped.
- See Also:
-
skip
default 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()forntimes (possibly stopping ifIterator.hasNext()becomes false).- Specified by:
skipin interfaceObjectIterator<K>- Parameters:
n- the number of elements to skip.- Returns:
- the number of elements actually skipped.
- See Also:
-