Class AbstractLinkedDeque.AbstractLinkedIterator

java.lang.Object
com.github.benmanes.caffeine.cache.AbstractLinkedDeque.AbstractLinkedIterator
All Implemented Interfaces:
LinkedDeque.PeekingIterator<E>, Iterator<E>
Enclosing class:
AbstractLinkedDeque<E>

abstract class AbstractLinkedDeque.AbstractLinkedIterator extends Object implements LinkedDeque.PeekingIterator<E>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) @Nullable E
     
    (package private) @Nullable E
     
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    (package private) abstract @Nullable E
    Retrieves the next element to traverse to or null if there are no more elements.
    boolean
     
     
    @Nullable E
    Returns the next element in the iteration, without advancing the iteration.
    void
     

    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 Details

    • previous

      @Nullable E previous
    • cursor

      @Nullable E cursor
  • Constructor Details

    • AbstractLinkedIterator

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

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<E>
    • peek

      public @Nullable E peek()
      Description copied from interface: LinkedDeque.PeekingIterator
      Returns the next element in the iteration, without advancing the iteration.
      Specified by:
      peek in interface LinkedDeque.PeekingIterator<E>
    • next

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

      abstract @Nullable 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 Iterator<E>