ArrayDeque (Java Platform SE 8 ) (original) (raw)
Modifier and Type
Method
Description
boolean
[add](../../java/util/ArrayDeque.html#add-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the end of this deque.
void
[addFirst](../../java/util/ArrayDeque.html#addFirst-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the front of this deque.
void
[addLast](../../java/util/ArrayDeque.html#addLast-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the end of this deque.
void
[clear](../../java/util/ArrayDeque.html#clear--)()
Removes all of the elements from this deque.
[ArrayDeque](../../java/util/ArrayDeque.html "class in java.util")<[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")>
[clone](../../java/util/ArrayDeque.html#clone--)()
Returns a copy of this deque.
boolean
[contains](../../java/util/ArrayDeque.html#contains-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") o)
Returns true
if this deque contains the specified element.
[Iterator](../../java/util/Iterator.html "interface in java.util")<[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")>
[descendingIterator](../../java/util/ArrayDeque.html#descendingIterator--)()
Returns an iterator over the elements in this deque in reverse sequential order.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[element](../../java/util/ArrayDeque.html#element--)()
Retrieves, but does not remove, the head of the queue represented by this deque.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[getFirst](../../java/util/ArrayDeque.html#getFirst--)()
Retrieves, but does not remove, the first element of this deque.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[getLast](../../java/util/ArrayDeque.html#getLast--)()
Retrieves, but does not remove, the last element of this deque.
boolean
[isEmpty](../../java/util/ArrayDeque.html#isEmpty--)()
Returns true
if this deque contains no elements.
[Iterator](../../java/util/Iterator.html "interface in java.util")<[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")>
[iterator](../../java/util/ArrayDeque.html#iterator--)()
Returns an iterator over the elements in this deque.
boolean
[offer](../../java/util/ArrayDeque.html#offer-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the end of this deque.
boolean
[offerFirst](../../java/util/ArrayDeque.html#offerFirst-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the front of this deque.
boolean
[offerLast](../../java/util/ArrayDeque.html#offerLast-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Inserts the specified element at the end of this deque.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[peek](../../java/util/ArrayDeque.html#peek--)()
Retrieves, but does not remove, the head of the queue represented by this deque, or returns null
if this deque is empty.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[peekFirst](../../java/util/ArrayDeque.html#peekFirst--)()
Retrieves, but does not remove, the first element of this deque, or returns null
if this deque is empty.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[peekLast](../../java/util/ArrayDeque.html#peekLast--)()
Retrieves, but does not remove, the last element of this deque, or returns null
if this deque is empty.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[poll](../../java/util/ArrayDeque.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/ArrayDeque.html "type parameter in ArrayDeque")
[pollFirst](../../java/util/ArrayDeque.html#pollFirst--)()
Retrieves and removes the first element of this deque, or returns null
if this deque is empty.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[pollLast](../../java/util/ArrayDeque.html#pollLast--)()
Retrieves and removes the last element of this deque, or returns null
if this deque is empty.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[pop](../../java/util/ArrayDeque.html#pop--)()
Pops an element from the stack represented by this deque.
void
[push](../../java/util/ArrayDeque.html#push-E-)([E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque") e)
Pushes an element onto the stack represented by this deque.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[remove](../../java/util/ArrayDeque.html#remove--)()
Retrieves and removes the head of the queue represented by this deque.
boolean
[remove](../../java/util/ArrayDeque.html#remove-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") o)
Removes a single instance of the specified element from this deque.
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[removeFirst](../../java/util/ArrayDeque.html#removeFirst--)()
Retrieves and removes the first element of this deque.
boolean
[removeFirstOccurrence](../../java/util/ArrayDeque.html#removeFirstOccurrence-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") o)
Removes the first occurrence of the specified element in this deque (when traversing the deque from head to tail).
[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")
[removeLast](../../java/util/ArrayDeque.html#removeLast--)()
Retrieves and removes the last element of this deque.
boolean
[removeLastOccurrence](../../java/util/ArrayDeque.html#removeLastOccurrence-java.lang.Object-)([Object](../../java/lang/Object.html "class in java.lang") o)
Removes the last occurrence of the specified element in this deque (when traversing the deque from head to tail).
int
[size](../../java/util/ArrayDeque.html#size--)()
Returns the number of elements in this deque.
[Spliterator](../../java/util/Spliterator.html "interface in java.util")<[E](../../java/util/ArrayDeque.html "type parameter in ArrayDeque")>
[spliterator](../../java/util/ArrayDeque.html#spliterator--)()
[Object](../../java/lang/Object.html "class in java.lang")[]
[toArray](../../java/util/ArrayDeque.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/ArrayDeque.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.