Java java.util ArrayDeque fields, constructors, methods, implement or subclass

Example usage for Java java.util ArrayDeque fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util ArrayDeque.

The text is from its open source code.

Constructor

ArrayDeque(int numElements)
Constructs an empty array deque with an initial capacity sufficient to hold the specified number of elements.
ArrayDeque(Collection c)
Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator.
ArrayDeque()
Constructs an empty array deque with an initial capacity sufficient to hold 16 elements.

Method

booleanadd(E e)
Inserts the specified element at the end of this deque.
booleanaddAll(Collection c)
Adds all of the elements in the specified collection at the end of this deque, as if by calling #addLast on each one, in the order that they are returned by the collection's iterator.
voidaddFirst(E e)
Inserts the specified element at the front of this deque.
voidaddLast(E e)
Inserts the specified element at the end of this deque.
voidclear()
Removes all of the elements from this deque.
ArrayDequeclone()
Returns a copy of this deque.
booleancontains(Object o)
Returns true if this deque contains the specified element.
IteratordescendingIterator()
Eelement()
Retrieves, but does not remove, the head of the queue represented by this deque.
EgetFirst()
EgetLast()
booleanisEmpty()
Returns true if this deque contains no elements.
Iteratoriterator()
Returns an iterator over the elements in this deque.
booleanoffer(E e)
Inserts the specified element at the end of this deque.
booleanofferFirst(E e)
Inserts the specified element at the front of this deque.
booleanofferLast(E e)
Inserts the specified element at the end of this deque.
Epeek()
Retrieves, but does not remove, the head of the queue represented by this deque, or returns null if this deque is empty.
EpeekFirst()
EpeekLast()
Epoll()
Retrieves and removes 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.
EpollFirst()
EpollLast()
Epop()
Pops an element from the stack represented by this deque.
voidpush(E e)
Pushes an element onto the stack represented by this deque.
Eremove()
Retrieves and removes the head of the queue represented by this deque.
booleanremove(Object o)
Removes a single instance of the specified element from this deque.
EremoveFirst()
booleanremoveFirstOccurrence(Object o)
Removes the first occurrence of the specified element in this deque (when traversing the deque from head to tail).
EremoveLast()
booleanremoveLastOccurrence(Object o)
Removes the last occurrence of the specified element in this deque (when traversing the deque from head to tail).
intsize()
Returns the number of elements in this deque.
Object[]toArray()
Returns an array containing all of the elements in this deque in proper sequence (from first to last element).
T[]toArray(Class klazz)
T[]toArray(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.