Package it.unimi.dsi.fastutil.objects
Interface ObjectBidirectionalIterator<K>
- All Superinterfaces:
BidirectionalIterator<K>,java.util.Iterator<K>,ObjectIterator<K>
- All Known Subinterfaces:
BooleanBidirectionalIterator,BooleanBigListIterator,ByteBidirectionalIterator,ByteBigListIterator,CharBidirectionalIterator,CharBigListIterator,DoubleBidirectionalIterator,DoubleBigListIterator,DoubleListIterator,FloatBidirectionalIterator,FloatBigListIterator,IntBidirectionalIterator,IntBigListIterator,IntListIterator,LongBidirectionalIterator,LongBigListIterator,LongListIterator,ObjectBigListIterator<K>,ObjectListIterator<K>,ShortBidirectionalIterator,ShortBigListIterator
- All Known Implementing Classes:
AbstractDoubleBidirectionalIterator,AbstractDoubleBigListIterator,AbstractDoubleListIterator,AbstractIntBidirectionalIterator,AbstractIntBigListIterator,AbstractIntListIterator,AbstractLongBidirectionalIterator,AbstractLongBigListIterator,AbstractLongListIterator,AbstractObjectBidirectionalIterator,AbstractObjectBigListIterator,AbstractObjectListIterator,DoubleBigListIterators.AbstractIndexBasedBigListIterator,DoubleBigListIterators.BigListIteratorListIterator,DoubleBigListIterators.EmptyBigListIterator,DoubleBigListIterators.UnmodifiableBigListIterator,DoubleIterators.AbstractIndexBasedListIterator,DoubleIterators.EmptyIterator,DoubleIterators.UnmodifiableBidirectionalIterator,DoubleIterators.UnmodifiableListIterator,IntBigListIterators.AbstractIndexBasedBigListIterator,IntBigListIterators.BigListIteratorListIterator,IntBigListIterators.EmptyBigListIterator,IntBigListIterators.UnmodifiableBigListIterator,IntIterators.AbstractIndexBasedListIterator,IntIterators.EmptyIterator,IntIterators.UnmodifiableBidirectionalIterator,IntIterators.UnmodifiableListIterator,LongBigListIterators.AbstractIndexBasedBigListIterator,LongBigListIterators.BigListIteratorListIterator,LongBigListIterators.EmptyBigListIterator,LongBigListIterators.UnmodifiableBigListIterator,LongIterators.AbstractIndexBasedListIterator,LongIterators.EmptyIterator,LongIterators.UnmodifiableBidirectionalIterator,LongIterators.UnmodifiableListIterator,ObjectBigListIterators.AbstractIndexBasedBigListIterator,ObjectBigListIterators.BigListIteratorListIterator,ObjectBigListIterators.EmptyBigListIterator,ObjectBigListIterators.UnmodifiableBigListIterator,ObjectIterators.AbstractIndexBasedListIterator,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
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:
BidirectionalIterator.previous()
-
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:
Iterator.next()
-