Schnittstelle ObjectBidirectionalIterator<T>

Typparameter:
T - the keyType of elements maintained by this Collection
Alle Superschnittstellen:
Iterator<T>, ObjectIterator<T>
Alle bekannten Unterschnittstellen:
BooleanBidirectionalIterator, BooleanListIterator, ByteBidirectionalIterator, ByteListIterator, CharBidirectionalIterator, CharListIterator, DoubleBidirectionalIterator, DoubleListIterator, FloatBidirectionalIterator, FloatListIterator, IntBidirectionalIterator, IntListIterator, LongBidirectionalIterator, LongListIterator, ObjectListIterator<T>, ShortBidirectionalIterator, ShortListIterator

public interface ObjectBidirectionalIterator<T> extends ObjectIterator<T>
This is a basically a ListIterator without the index functions. Allowing to have a simple Bidirectional Iterator without having to keep track of the Iteration index.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default int
    back(int amount)
    Reverses the Given amount of elements if possible.
    boolean
    Returns true if the Iterator has a Previous element
    Returns the Previous element of the iterator.

    Von Schnittstelle geerbte Methoden java.util.Iterator

    forEachRemaining, hasNext, next, remove

    Von Schnittstelle geerbte Methoden speiger.src.collections.objects.collections.ObjectIterator

    forEachRemaining, skip
  • Methodendetails

    • hasPrevious

      boolean hasPrevious()
      Returns true if the Iterator has a Previous element
      Gibt zurück:
      true if the Iterator has a Previous element
    • previous

      T previous()
      Returns the Previous element of the iterator.
      Gibt zurück:
      the Previous element of the iterator.
      Löst aus:
      NoSuchElementException - if the iteration has no more elements
    • back

      default int back(int amount)
      Reverses the Given amount of elements if possible. A Optimization function to reverse elements faster if the implementation allows it.
      Parameter:
      amount - the amount of elements that should be reversed
      Gibt zurück:
      the amount of elements that were reversed