Class AccessOrderDeque<E extends AccessOrderDeque.AccessOrder<E>>
java.lang.Object
java.util.AbstractCollection<E>
com.github.benmanes.caffeine.cache.AbstractLinkedDeque<E>
com.github.benmanes.caffeine.cache.AccessOrderDeque<E>
- Type Parameters:
E
- the type of elements held in this collection
- All Implemented Interfaces:
LinkedDeque<E>
,Iterable<E>
,Collection<E>
,Deque<E>
,Queue<E>
,SequencedCollection<E>
final class AccessOrderDeque<E extends AccessOrderDeque.AccessOrder<E>>
extends AbstractLinkedDeque<E>
A linked deque implementation used to represent an access-order queue.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
An element that is linked on theDeque
.Nested classes/interfaces inherited from class com.github.benmanes.caffeine.cache.AbstractLinkedDeque
AbstractLinkedDeque.AbstractLinkedIterator
Nested classes/interfaces inherited from interface com.github.benmanes.caffeine.cache.LinkedDeque
LinkedDeque.PeekingIterator<E>
-
Field Summary
Fields inherited from class com.github.benmanes.caffeine.cache.AbstractLinkedDeque
first, last
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
boolean
@Nullable E
Retrieves the next element or null if either the element is unlinked or the last element on the deque.@Nullable E
getPrevious
(E e) Retrieves the previous element or null if either the element is unlinked or the first element on the deque.(package private) boolean
boolean
void
Sets the next element or null if there is no link.void
setPrevious
(E e, @Nullable E prev) Sets the previous element or null if there is no link.Methods inherited from class com.github.benmanes.caffeine.cache.AbstractLinkedDeque
add, addFirst, addLast, checkNotEmpty, clear, descendingIterator, element, getFirst, getLast, isEmpty, isFirst, isLast, iterator, linkFirst, linkLast, moveToBack, moveToFront, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, removeAll, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size, unlink, unlinkFirst, unlinkLast
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, parallelStream, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
-
Constructor Details
-
AccessOrderDeque
AccessOrderDeque()
-
-
Method Details
-
contains
- Specified by:
contains
in interfaceCollection<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
contains
in interfaceDeque<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
contains
in classAbstractLinkedDeque<E extends AccessOrderDeque.AccessOrder<E>>
-
contains
-
remove
- Specified by:
remove
in interfaceCollection<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
remove
in interfaceDeque<E extends AccessOrderDeque.AccessOrder<E>>
- Overrides:
remove
in classAbstractCollection<E extends AccessOrderDeque.AccessOrder<E>>
-
remove
-
getPrevious
Description copied from interface:LinkedDeque
Retrieves the previous element or null if either the element is unlinked or the first element on the deque. -
setPrevious
Description copied from interface:LinkedDeque
Sets the previous element or null if there is no link. -
getNext
Description copied from interface:LinkedDeque
Retrieves the next element or null if either the element is unlinked or the last element on the deque. -
setNext
Description copied from interface:LinkedDeque
Sets the next element or null if there is no link.
-