Class EmptyOrderedIterator<E>

java.lang.Object
org.apache.openjpa.lib.util.collections.EmptyOrderedIterator<E>
Type Parameters:
E - the type to iterate.
All Implemented Interfaces:
Iterator<E>, OrderedIterator<E>, ResettableIterator<E>

public class EmptyOrderedIterator<E> extends Object implements OrderedIterator<E>, ResettableIterator<E>
Provides an implementation of an empty ordered iterator.
Since:
3.1
  • Field Details

    • INSTANCE

      public static final OrderedIterator INSTANCE
      Singleton instance of the iterator.
      Since:
      3.1
  • Constructor Details

    • EmptyOrderedIterator

      protected EmptyOrderedIterator()
      Constructor.
  • Method Details

    • emptyOrderedIterator

      public static <E> OrderedIterator<E> emptyOrderedIterator()
      Typed instance of the iterator.
      Type Parameters:
      E - the element type
      Returns:
      OrderedIterator<E>
    • hasNext

      public boolean hasNext()
    • next

      public E next()
    • hasPrevious

      public boolean hasPrevious()
    • previous

      public E previous()
    • nextIndex

      public int nextIndex()
    • previousIndex

      public int previousIndex()
    • add

      public void add(E obj)
    • set

      public void set(E obj)
    • remove

      public void remove()
    • reset

      public void reset()