Class EmptyIterator

  • All Implemented Interfaces:
    Iterator, ResettableIterator

    @Deprecated(since="2021-04-30")
    public class EmptyIterator
    extends Object
    implements ResettableIterator
    Deprecated.
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    Provides an implementation of an empty iterator.

    This class provides an implementation of an empty iterator. This class provides for binary compatability between Commons Collections 2.1.1 and 3.1 due to issues with IteratorUtils.

    Since:
    Commons Collections 2.1.1 and 3.1
    • Field Detail

      • RESETTABLE_INSTANCE

        public static final ResettableIterator RESETTABLE_INSTANCE
        Deprecated.
        Singleton instance of the iterator.
        Since:
        Commons Collections 3.1
      • INSTANCE

        public static final Iterator INSTANCE
        Deprecated.
        Singleton instance of the iterator.
        Since:
        Commons Collections 2.1.1 and 3.1
    • Method Detail

      • hasNext

        public boolean hasNext()
        Deprecated.
      • next

        public Object next()
        Deprecated.
      • hasPrevious

        public boolean hasPrevious()
        Deprecated.
      • previous

        public Object previous()
        Deprecated.
      • nextIndex

        public int nextIndex()
        Deprecated.
      • previousIndex

        public int previousIndex()
        Deprecated.
      • add

        public void add​(Object obj)
        Deprecated.
      • set

        public void set​(Object obj)
        Deprecated.
      • remove

        public void remove()
        Deprecated.
      • getKey

        public Object getKey()
        Deprecated.
      • getValue

        public Object getValue()
        Deprecated.
      • setValue

        public Object setValue​(Object value)
        Deprecated.
      • reset

        public void reset()
        Deprecated.