ConcurrentLinkedDeque (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

boolean

[add](../../../java/util/concurrent/ConcurrentLinkedDeque.html#add-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the tail of this deque.

boolean

[addAll](../../../java/util/concurrent/ConcurrentLinkedDeque.html#addAll-java.util.Collection-)([Collection](../../../java/util/Collection.html "interface in java.util")<? extends [E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")> c)

Appends all of the elements in the specified collection to the end of this deque, in the order that they are returned by the specified collection's iterator.

void

[addFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#addFirst-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the front of this deque.

void

[addLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#addLast-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the end of this deque.

void

[clear](../../../java/util/concurrent/ConcurrentLinkedDeque.html#clear--)()

Removes all of the elements from this deque.

boolean

[contains](../../../java/util/concurrent/ConcurrentLinkedDeque.html#contains-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Returns true if this deque contains at least one element e such that o.equals(e).

[Iterator](../../../java/util/Iterator.html "interface in java.util")<[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")>

[descendingIterator](../../../java/util/concurrent/ConcurrentLinkedDeque.html#descendingIterator--)()

Returns an iterator over the elements in this deque in reverse sequential order.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[element](../../../java/util/concurrent/ConcurrentLinkedDeque.html#element--)()

Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque).

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[getFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#getFirst--)()

Retrieves, but does not remove, the first element of this deque.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[getLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#getLast--)()

Retrieves, but does not remove, the last element of this deque.

boolean

[isEmpty](../../../java/util/concurrent/ConcurrentLinkedDeque.html#isEmpty--)()

Returns true if this collection contains no elements.

[Iterator](../../../java/util/Iterator.html "interface in java.util")<[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")>

[iterator](../../../java/util/concurrent/ConcurrentLinkedDeque.html#iterator--)()

Returns an iterator over the elements in this deque in proper sequence.

boolean

[offer](../../../java/util/concurrent/ConcurrentLinkedDeque.html#offer-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the tail of this deque.

boolean

[offerFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#offerFirst-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the front of this deque.

boolean

[offerLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#offerLast-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Inserts the specified element at the end of this deque.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[peek](../../../java/util/concurrent/ConcurrentLinkedDeque.html#peek--)()

Retrieves, but does not remove, the head of the queue represented by this deque (in other words, the first element of this deque), or returns null if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[peekFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#peekFirst--)()

Retrieves, but does not remove, the first element of this deque, or returns null if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[peekLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#peekLast--)()

Retrieves, but does not remove, the last element of this deque, or returns null if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[poll](../../../java/util/concurrent/ConcurrentLinkedDeque.html#poll--)()

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), or returnsnull if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[pollFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#pollFirst--)()

Retrieves and removes the first element of this deque, or returns null if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[pollLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#pollLast--)()

Retrieves and removes the last element of this deque, or returns null if this deque is empty.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[pop](../../../java/util/concurrent/ConcurrentLinkedDeque.html#pop--)()

Pops an element from the stack represented by this deque.

void

[push](../../../java/util/concurrent/ConcurrentLinkedDeque.html#push-E-)([E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque") e)

Pushes an element onto the stack represented by this deque (in other words, at the head of this deque) if it is possible to do so immediately without violating capacity restrictions, throwing anIllegalStateException if no space is currently available.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[remove](../../../java/util/concurrent/ConcurrentLinkedDeque.html#remove--)()

Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque).

boolean

[remove](../../../java/util/concurrent/ConcurrentLinkedDeque.html#remove-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Removes the first element e such thato.equals(e), if such an element exists in this deque.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[removeFirst](../../../java/util/concurrent/ConcurrentLinkedDeque.html#removeFirst--)()

Retrieves and removes the first element of this deque.

boolean

[removeFirstOccurrence](../../../java/util/concurrent/ConcurrentLinkedDeque.html#removeFirstOccurrence-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Removes the first element e such thato.equals(e), if such an element exists in this deque.

[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")

[removeLast](../../../java/util/concurrent/ConcurrentLinkedDeque.html#removeLast--)()

Retrieves and removes the last element of this deque.

boolean

[removeLastOccurrence](../../../java/util/concurrent/ConcurrentLinkedDeque.html#removeLastOccurrence-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Removes the last element e such thato.equals(e), if such an element exists in this deque.

int

[size](../../../java/util/concurrent/ConcurrentLinkedDeque.html#size--)()

Returns the number of elements in this deque.

[Spliterator](../../../java/util/Spliterator.html "interface in java.util")<[E](../../../java/util/concurrent/ConcurrentLinkedDeque.html "type parameter in ConcurrentLinkedDeque")>

[spliterator](../../../java/util/concurrent/ConcurrentLinkedDeque.html#spliterator--)()

Returns a Spliterator over the elements in this deque.

[Object](../../../java/lang/Object.html "class in java.lang")[]

[toArray](../../../java/util/concurrent/ConcurrentLinkedDeque.html#toArray--)()

Returns an array containing all of the elements in this deque, in proper sequence (from first to last element).

<T> T[]

[toArray](../../../java/util/concurrent/ConcurrentLinkedDeque.html#toArray-T:A-)(T[] a)

Returns an array containing all of the elements in this deque, in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.