Top Description Inners Fields Constructors Methods
com.github.benmanes.caffeine.cache

pack-priv final Class AccessOrderDeque<E extends AccessOrderDeque.AccessOrder<E>>

extends AbstractLinkedDeque<E extends AccessOrderDeque.AccessOrder<E>>
Class Inheritance
Type Parameters
<E>
the type of elements held in this collection
Imports
java.util.Deque, org.checkerframework.checker.nullness.qual.Nullable, com.github.benmanes.caffeine.cache.AccessOrderDeque.AccessOrder

A linked deque implementation used to represent an access-order queue.
Author
[email protected] (Ben Manes)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
AccessOrderDeque.AccessOrder<T extends AccessOrderDeque.AccessOrder<T>>

An element that is linked on the Deque.

Field Summary

Inherited from com.github.benmanes.caffeine.cache.AbstractLinkedDeque:
firstlastmodCount

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
element whose presence in this deque is to be tested
o
)

Implements abstract com.github.benmanes.caffeine.cache.AbstractLinkedDeque.contains.

Implements java.util.Deque.contains, java.util.Collection.contains.

Returns true if this deque contains the specified element.
pack-priv boolean
public @Nullable E
getNext(E e)

Implements com.github.benmanes.caffeine.cache.LinkedDeque.getNext.

Retrieves the next element or null if either the element is unlinked or the last element on the deque.
public @Nullable E
getPrevious(E e)

Implements com.github.benmanes.caffeine.cache.LinkedDeque.getPrevious.

Retrieves the previous element or null if either the element is unlinked or the first element on the deque.
public boolean
remove(Object
element to be removed from this deque, if present
o
)

Implements abstract com.github.benmanes.caffeine.cache.AbstractLinkedDeque.remove.

Implements java.util.Deque.remove, java.util.Collection.remove.

Removes the first occurrence of the specified element from this deque.
pack-priv boolean
remove(E e)

public void
setNext(E e, @Nullable E next)

public void
setPrevious(E e, @Nullable E prev)

Inherited from com.github.benmanes.caffeine.cache.AbstractLinkedDeque:
addaddFirstaddLastcheckNotEmptycleardescendingIteratorelementgetFirstgetLastisEmptyisFirstisLastiteratorlinkFirstlinkLastmoveToBackmoveToFrontofferofferFirstofferLastpeekpeekFirstpeekLastpollpollFirstpollLastpoppushremoveremoveAllremoveFirstremoveFirstOccurrenceremoveLastremoveLastOccurrencesizeunlinkunlinkFirstunlinkLast

Constructor Detail

AccessOrderDequeback to summary
pack-priv AccessOrderDeque()

Method Detail

containsback to summary
public boolean contains(Object o)

Implements abstract com.github.benmanes.caffeine.cache.AbstractLinkedDeque.contains.

Implements java.util.Deque.contains, java.util.Collection.contains.

Doc from java.util.Deque.contains.

Returns true if this deque contains the specified element. More formally, returns true if and only if this deque contains at least one element e such that Objects.equals(o, e).

Parameters
o:Object

element whose presence in this deque is to be tested

Returns:boolean

true if this deque contains the specified element

Annotations
@Override
containsback to summary
pack-priv boolean contains(AccessOrderDeque.AccessOrder<?> e)
getNextback to summary
public @Nullable E getNext(E e)

Implements com.github.benmanes.caffeine.cache.LinkedDeque.getNext.

Doc from com.github.benmanes.caffeine.cache.LinkedDeque.getNext.

Retrieves the next element or null if either the element is unlinked or the last element on the deque.

Annotations
@Override
getPreviousback to summary
public @Nullable E getPrevious(E e)

Implements com.github.benmanes.caffeine.cache.LinkedDeque.getPrevious.

Doc from com.github.benmanes.caffeine.cache.LinkedDeque.getPrevious.

Retrieves the previous element or null if either the element is unlinked or the first element on the deque.

Annotations
@Override
removeback to summary
public boolean remove(Object o)

Implements abstract com.github.benmanes.caffeine.cache.AbstractLinkedDeque.remove.

Implements java.util.Deque.remove, java.util.Collection.remove.

Doc from java.util.Deque.remove.

Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element e such that Objects.equals(o, e) (if such an element exists). Returns true if this deque contained the specified element (or equivalently, if this deque changed as a result of the call).

This method is equivalent to removeFirstOccurrence(Object).

Parameters
o:Object

element to be removed from this deque, if present

Returns:boolean

true if an element was removed as a result of this call

Annotations
@Override
@SuppressWarnings:unchecked
removeback to summary
pack-priv boolean remove(E e)
setNextback to summary
public void setNext(E e, @Nullable E next)
Annotations
@Override
setPreviousback to summary
public void setPrevious(E e, @Nullable E prev)
Annotations
@Override
com.github.benmanes.caffeine.cache back to summary

pack-priv Interface AccessOrderDeque.AccessOrder<T extends AccessOrderDeque.AccessOrder<T>>

Known Direct Implementers
com.github.benmanes.caffeine.cache.Node

An element that is linked on the Deque.

Method Summary

Modifier and TypeMethod and Description
public @Nullable T
getNextInAccessOrder()

Retrieves the next element or null if either the element is unlinked or the last element on the deque.

public @Nullable T
getPreviousInAccessOrder()

Retrieves the previous element or null if either the element is unlinked or the first element on the deque.

public void
setNextInAccessOrder(@Nullable T next)

Sets the next element or null if there is no link.

public void
setPreviousInAccessOrder(@Nullable T prev)

Sets the previous element or null if there is no link.

Method Detail

getNextInAccessOrderback to summary
public @Nullable T getNextInAccessOrder()

Retrieves the next element or null if either the element is unlinked or the last element on the deque.

getPreviousInAccessOrderback to summary
public @Nullable T getPreviousInAccessOrder()

Retrieves the previous element or null if either the element is unlinked or the first element on the deque.

setNextInAccessOrderback to summary
public void setNextInAccessOrder(@Nullable T next)

Sets the next element or null if there is no link.

setPreviousInAccessOrderback to summary
public void setPreviousInAccessOrder(@Nullable T prev)

Sets the previous element or null if there is no link.