Interface BidirectionalIterator<T>

  • Type Parameters:
    T - the type of element in the iterator
    All Superinterfaces:
    java.util.Iterator<T>

    public interface BidirectionalIterator<T>
    extends java.util.Iterator<T>

    An Iterator which can iterate back to previous elements.

    Since:
    2.0
    Version:
    2.0
    Author:
    Pavel Klinov
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasPrevious()
      Return whether or not there is a previous element
      T previous()
      Return the previous element
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, hasNext, next, remove
    • Method Detail

      • hasPrevious

        boolean hasPrevious()
        Return whether or not there is a previous element
        Returns:
        true if there is a previous, false otherwise
      • previous

        T previous()
        Return the previous element
        Returns:
        the previous element