Class AbstractLinkedDeque.AbstractLinkedIterator
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.AbstractLinkedDeque.AbstractLinkedIterator
-
- All Implemented Interfaces:
LinkedDeque.PeekingIterator<E>
,java.util.Iterator<E>
- Enclosing class:
- AbstractLinkedDeque<E>
abstract class AbstractLinkedDeque.AbstractLinkedIterator extends java.lang.Object implements LinkedDeque.PeekingIterator<E>
-
-
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()
-
-
-
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 interfacejava.util.Iterator<E>
-
peek
public E peek()
Description copied from interface:LinkedDeque.PeekingIterator
Returns the next element in the iteration, without advancing the iteration.- Specified by:
peek
in interfaceLinkedDeque.PeekingIterator<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 interfacejava.util.Iterator<E>
-
-