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

    Modifier and Type Method Description
    default int back​(int n)
    Moves back for the given number of elements.
    default int skip​(int n)
    Skips the given number of elements.

    Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator

    hasPrevious, previous

    Methods 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() for n times (possibly stopping if BidirectionalIterator.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() for n times (possibly stopping if Iterator.hasNext() becomes false).

      Specified by:
      skip in interface ObjectIterator<K>
      Parameters:
      n - the number of elements to skip.
      Returns:
      the number of elements actually skipped.
      See Also:
      Iterator.next()