Interface ObjectBidirectionalIterator<K>
-
- All Superinterfaces:
BidirectionalIterator<K>,Iterator<K>,ObjectIterator<K>
- All Known Subinterfaces:
CharBidirectionalIterator,CharListIterator,ObjectListIterator<K>
- All Known Implementing Classes:
AbstractCharBidirectionalIterator,AbstractCharListIterator,AbstractObjectBidirectionalIterator,AbstractObjectListIterator,CharIterators.EmptyIterator,CharIterators.UnmodifiableBidirectionalIterator,CharIterators.UnmodifiableListIterator,ObjectIterators.EmptyIterator,ObjectIterators.UnmodifiableBidirectionalIterator,ObjectIterators.UnmodifiableListIterator
public interface ObjectBidirectionalIterator<K> extends ObjectIterator<K>, BidirectionalIterator<K>
A type-specific bidirectional iterator; provides an additional method to avoid (un)boxing, and the possibility to skip elements backwards.- See Also:
BidirectionalIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intback(int n)Moves back for the given number of elements.-
Methods inherited from interface org.codelibs.jhighlight.fastutil.BidirectionalIterator
hasPrevious, previous
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface org.codelibs.jhighlight.fastutil.objects.ObjectIterator
skip
-
-
-
-
Method Detail
-
back
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:
Iterator.next()
-
-