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 EcomputeNext()Retrieves the next element to traverse to or null if there are no more elements.booleanhasNext()Enext()Epeek()Returns the next element in the iteration, without advancing the iteration.voidremove()
-
-
-
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:
hasNextin interfacejava.util.Iterator<E>
-
peek
public E peek()
Description copied from interface:LinkedDeque.PeekingIteratorReturns the next element in the iteration, without advancing the iteration.- Specified by:
peekin 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:
removein interfacejava.util.Iterator<E>
-
-