java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
it.auties.whatsapp.util.ConcurrentLinkedHashedDequeue<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Deque<E>,Queue<E>,SequencedCollection<E>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<ConcurrentLinkedHashedDequeue.Node<E>> private final AtomicReference<ConcurrentLinkedHashedDequeue.Node<E>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidvoidbooleanelement()getFirst()getLast()booleanisEmpty()iterator()booleanbooleanofferFirst(E e) booleanpeek()peekLast()poll()pollLast()pop()voidremove()booleanbooleanremoveAll(Collection<?> collection) booleanbooleanbooleanprivate voidremoveNode(ConcurrentLinkedHashedDequeue.Node<E> node, int hash) intsize()Methods inherited from class java.util.AbstractQueue
addAll, clearMethods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
clear, containsAll, equals, hashCode, parallelStream, retainAll, spliterator, stream, toArray, toArray, toArray
-
Field Details
-
head
-
tail
-
hashes
-
-
Constructor Details
-
ConcurrentLinkedHashedDequeue
public ConcurrentLinkedHashedDequeue()
-
-
Method Details
-
push
-
offer
-
offerLast
-
addLast
-
add
-
offerFirst
- Specified by:
offerFirstin interfaceDeque<E>
-
addFirst
-
removeLast
- Specified by:
removeLastin interfaceDeque<E>- Specified by:
removeLastin interfaceSequencedCollection<E>
-
remove
- Specified by:
removein interfaceCollection<E>- Specified by:
removein interfaceDeque<E>- Overrides:
removein classAbstractCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>- Overrides:
removeAllin classAbstractCollection<E>
-
poll
-
pollLast
-
remove
-
removeNode
-
pollFirst
-
pop
-
removeFirst
- Specified by:
removeFirstin interfaceDeque<E>- Specified by:
removeFirstin interfaceSequencedCollection<E>
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein interfaceDeque<E>- Specified by:
sizein classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>- Specified by:
containsin interfaceDeque<E>- Overrides:
containsin classAbstractCollection<E>
-
iterator
-
descendingIterator
- Specified by:
descendingIteratorin interfaceDeque<E>
-
element
-
peekFirst
-
peek
-
peekLast
-
getFirst
-
getLast
-
removeFirstOccurrence
- Specified by:
removeFirstOccurrencein interfaceDeque<E>
-
removeIf
- Specified by:
removeIfin interfaceCollection<E>
-
removeLastOccurrence
- Specified by:
removeLastOccurrencein interfaceDeque<E>
-