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

pack-priv final Class WriteOrderDeque<E extends WriteOrderDeque.WriteOrder<E>>

extends AbstractLinkedDeque<E extends WriteOrderDeque.WriteOrder<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.WriteOrderDeque.WriteOrder

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
WriteOrderDeque.WriteOrder<T extends WriteOrderDeque.WriteOrder<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.
public 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

WriteOrderDequeback to summary
pack-priv WriteOrderDeque()

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(WriteOrderDeque.WriteOrder<?> 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
public 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 WriteOrderDeque.WriteOrder<T extends WriteOrderDeque.WriteOrder<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
getNextInWriteOrder()

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

public @Nullable T
getPreviousInWriteOrder()

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

public void
setNextInWriteOrder(@Nullable T next)

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

public void
setPreviousInWriteOrder(@Nullable T prev)

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

Method Detail

getNextInWriteOrderback to summary
public @Nullable T getNextInWriteOrder()

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

getPreviousInWriteOrderback to summary
public @Nullable T getPreviousInWriteOrder()

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

setNextInWriteOrderback to summary
public void setNextInWriteOrder(@Nullable T next)

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

setPreviousInWriteOrderback to summary
public void setPreviousInWriteOrder(@Nullable T prev)

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