Class AbstractLinkedDeque.AbstractLinkedIterator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) E cursor  
      (package private) E previous  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractLinkedIterator​(E start)
      Creates an iterator that can can traverse the deque.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) abstract E computeNext()
      Retrieves the next element to traverse to or null if there are no more elements.
      boolean hasNext()  
      E next()  
      E peek()
      Returns the next element in the iteration, without advancing the iteration.
      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

      • previous

        E previous
      • cursor

        E cursor
    • Constructor Detail

      • AbstractLinkedIterator

        AbstractLinkedIterator​(E start)
        Creates an iterator that can can traverse the deque.
        Parameters:
        start - the initial element to begin traversal from
    • Method Detail

      • hasNext

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

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

        abstract E computeNext()
        Retrieves the next element to traverse to or null if there are no more elements.
      • remove

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