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>
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Deque<E>
,java.util.Queue<E>
@NotThreadSafe 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 Classes Modifier and Type Class Description (package private) static interface
AccessOrderDeque.AccessOrder<T extends AccessOrderDeque.AccessOrder<T>>
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 Constructor Description AccessOrderDeque()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
contains(AccessOrderDeque.AccessOrder<?> e)
boolean
contains(java.lang.Object o)
E
getNext(E e)
Retrieves the next element or null if either the element is unlinked or the last element on the deque.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
remove(E e)
boolean
remove(java.lang.Object o)
void
setNext(E e, E next)
Sets the next element or null if there is no link.void
setPrevious(E e, 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
-
-
-
-
Method Detail
-
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains
in interfacejava.util.Collection<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
contains
in interfacejava.util.Deque<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
contains
in classAbstractLinkedDeque<E extends AccessOrderDeque.AccessOrder<E>>
-
contains
boolean contains(AccessOrderDeque.AccessOrder<?> e)
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<E extends AccessOrderDeque.AccessOrder<E>>
- Specified by:
remove
in interfacejava.util.Deque<E extends AccessOrderDeque.AccessOrder<E>>
- Overrides:
remove
in classjava.util.AbstractCollection<E extends AccessOrderDeque.AccessOrder<E>>
-
remove
boolean remove(E e)
-
getPrevious
public E getPrevious(E e)
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
public void setPrevious(E e, E prev)
Description copied from interface:LinkedDeque
Sets the previous element or null if there is no link.
-
getNext
public E getNext(E e)
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
public void setNext(E e, E next)
Description copied from interface:LinkedDeque
Sets the next element or null if there is no link.
-
-