Class LinkedBlockingDeque.AbstractItr

    • Field Detail

      • nextItem

        E nextItem
        nextItem holds on to item fields because once we claim that an element exists in hasNext(), we must return item read under lock (in advance()) even if it was in the process of being removed when hasNext() was called.
      • lastRet

        private LinkedBlockingDeque.Node<E> lastRet
        Node returned by most recent call to next. Needed by remove. Reset to null if this element is deleted by a call to remove.
    • Constructor Detail

      • AbstractItr

        AbstractItr()
        Create a new iterator. Sets the initial position.
    • Method Detail

      • firstNode

        abstract LinkedBlockingDeque.Node<E> firstNode()
        Obtain the first node to be returned by the iterator.
        Returns:
        first node
      • advance

        void advance()
        Advances next.
      • 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>
      • remove

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