Interface ObjectIterator<K>

All Superinterfaces:
Iterator<K>
All Known Subinterfaces:
BooleanBidirectionalIterator, BooleanBigListIterator, BooleanListIterator, ByteBidirectionalIterator, ByteBigListIterator, ByteListIterator, CharBidirectionalIterator, CharBigListIterator, CharListIterator, DoubleBidirectionalIterator, DoubleBigListIterator, DoubleListIterator, FloatBidirectionalIterator, FloatBigListIterator, FloatListIterator, IntBidirectionalIterator, IntBigListIterator, IntListIterator, LongBidirectionalIterator, LongBigListIterator, LongListIterator, ObjectBidirectionalIterator<K>, ObjectBigListIterator<K>, ObjectListIterator<K>, ShortBidirectionalIterator, ShortBigListIterator, ShortListIterator
All Known Implementing Classes:
AbstractBooleanBidirectionalIterator, AbstractBooleanBigListIterator, AbstractBooleanListIterator, AbstractByteBidirectionalIterator, AbstractByteBigListIterator, AbstractByteListIterator, AbstractCharBidirectionalIterator, AbstractCharBigListIterator, AbstractCharListIterator, AbstractDoubleBidirectionalIterator, AbstractDoubleBigListIterator, AbstractDoubleListIterator, AbstractFloatBidirectionalIterator, AbstractFloatBigListIterator, AbstractFloatListIterator, AbstractIntBidirectionalIterator, AbstractIntBigListIterator, AbstractIntListIterator, AbstractLongBidirectionalIterator, AbstractLongBigListIterator, AbstractLongListIterator, AbstractObjectBidirectionalIterator, AbstractObjectBigListIterator, AbstractObjectIterator, AbstractObjectListIterator, AbstractShortBidirectionalIterator, AbstractShortBigListIterator, AbstractShortListIterator, BooleanBigListIterators.BigListIteratorListIterator, BooleanBigListIterators.EmptyBigListIterator, BooleanBigListIterators.UnmodifiableBigListIterator, BooleanIterators.EmptyIterator, BooleanIterators.UnmodifiableBidirectionalIterator, BooleanIterators.UnmodifiableListIterator, ByteBigListIterators.BigListIteratorListIterator, ByteBigListIterators.EmptyBigListIterator, ByteBigListIterators.UnmodifiableBigListIterator, ByteIterators.EmptyIterator, ByteIterators.UnmodifiableBidirectionalIterator, ByteIterators.UnmodifiableListIterator, CharBigListIterators.BigListIteratorListIterator, CharBigListIterators.EmptyBigListIterator, CharBigListIterators.UnmodifiableBigListIterator, CharIterators.EmptyIterator, CharIterators.UnmodifiableBidirectionalIterator, CharIterators.UnmodifiableListIterator, DoubleBigListIterators.BigListIteratorListIterator, DoubleBigListIterators.EmptyBigListIterator, DoubleBigListIterators.UnmodifiableBigListIterator, DoubleIterators.EmptyIterator, DoubleIterators.UnmodifiableBidirectionalIterator, DoubleIterators.UnmodifiableListIterator, FloatBigListIterators.BigListIteratorListIterator, FloatBigListIterators.EmptyBigListIterator, FloatBigListIterators.UnmodifiableBigListIterator, FloatIterators.EmptyIterator, FloatIterators.UnmodifiableBidirectionalIterator, FloatIterators.UnmodifiableListIterator, IntBigListIterators.BigListIteratorListIterator, IntBigListIterators.EmptyBigListIterator, IntBigListIterators.UnmodifiableBigListIterator, IntIterators.EmptyIterator, IntIterators.UnmodifiableBidirectionalIterator, IntIterators.UnmodifiableListIterator, LongBigListIterators.BigListIteratorListIterator, LongBigListIterators.EmptyBigListIterator, LongBigListIterators.UnmodifiableBigListIterator, LongIterators.EmptyIterator, LongIterators.UnmodifiableBidirectionalIterator, LongIterators.UnmodifiableListIterator, ObjectBigListIterators.BigListIteratorListIterator, ObjectBigListIterators.EmptyBigListIterator, ObjectBigListIterators.UnmodifiableBigListIterator, ObjectIterators.EmptyIterator, ObjectIterators.UnmodifiableBidirectionalIterator, ObjectIterators.UnmodifiableIterator, ObjectIterators.UnmodifiableListIterator, ShortBigListIterators.BigListIteratorListIterator, ShortBigListIterators.EmptyBigListIterator, ShortBigListIterators.UnmodifiableBigListIterator, ShortIterators.EmptyIterator, ShortIterators.UnmodifiableBidirectionalIterator, ShortIterators.UnmodifiableListIterator

public interface ObjectIterator<K>
extends Iterator<K>
A type-specific Iterator; provides an additional method to avoid (un)boxing, and the possibility to skip elements.
See Also:
Iterator
  • Method Summary

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

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Method Details

    • 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).

      Parameters:
      n - the number of elements to skip.
      Returns:
      the number of elements actually skipped.
      See Also:
      Iterator.next()