Class AbstractIterator<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.Object END_OF_DATA
      The token to be used in computeNextElement() to indicate the end of the iteration.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.Object computeNextElement()
      Returns the next iteration element, or END_OF_DATA if the end of the iteration has been reached.
      static <T> java.util.ListIterator<T> empty()  
      boolean hasNext()  
      T next()  
      void remove()  
      • Methods inherited from class java.lang.Object

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

        forEachRemaining
    • Field Detail

      • END_OF_DATA

        protected static final java.lang.Object END_OF_DATA
        The token to be used in computeNextElement() to indicate the end of the iteration.
    • Constructor Detail

      • AbstractIterator

        public AbstractIterator()
    • Method Detail

      • hasNext

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

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

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

        protected abstract java.lang.Object computeNextElement()
        Returns the next iteration element, or END_OF_DATA if the end of the iteration has been reached.
      • empty

        public static <T> java.util.ListIterator<T> empty()
        Since:
        3.4