Class NullIterator<T>

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

    public class NullIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>
    Null Iterator - also guaranteed shareable and immutable
    • Constructor Summary

      Constructors 
      Constructor Description
      NullIterator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void forEachRemaining​(java.util.function.Consumer<? super T> action)  
      boolean hasNext()  
      T next()  
      • Methods inherited from class java.lang.Object

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

        remove
    • Constructor Detail

      • NullIterator

        public NullIterator()
    • Method Detail

      • hasNext

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

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
      • forEachRemaining

        public void forEachRemaining​(java.util.function.Consumer<? super T> action)
        Specified by:
        forEachRemaining in interface java.util.Iterator<T>