Class EmptyIterator<E>

  • All Implemented Interfaces:
    java.util.Iterator<E>

    public class EmptyIterator<E>
    extends java.lang.Object
    implements java.util.Iterator<E>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static EmptyIterator<? extends java.lang.Object> INSTANCE  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private EmptyIterator()
      Creates a new instance of EmptyIterator
    • Field Detail

      • INSTANCE

        private static final EmptyIterator<? extends java.lang.Object> INSTANCE
    • Constructor Detail

      • EmptyIterator

        private EmptyIterator()
        Creates a new instance of EmptyIterator
    • Method Detail

      • getInstance

        public static <E> EmptyIterator<E> getInstance()
      • hasNext

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

        public E next()
               throws java.util.NoSuchElementException
        Specified by:
        next in interface java.util.Iterator<E>
        Throws:
        java.util.NoSuchElementException
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<E>