Class EmptyIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Object>

    public final class EmptyIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Object>
    A null instance of an Iterator.
    Version:
    2.4
    Since:
    2.4
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      static <T> java.util.Iterator<T> instance()
      Returns the singleton instance this EmptyIterator.
      java.lang.Object next()
      void remove()
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Method Detail

      • instance

        public static <T> java.util.Iterator<T> instance()
        Returns the singleton instance this EmptyIterator.
        Returns:
        The singleton instance this EmptyIterator
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.Object>
      • next

        public java.lang.Object next()
        Specified by:
        next in interface java.util.Iterator<java.lang.Object>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.lang.Object>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object