Modifiers and type methods and descriptions

boolean add(E e)Copy the code

If this can be done immediately without violating the capacity limit, the specified element is inserted into the queue represented by this two-ended queue (in other words, at the tail of this two-ended queue), true returns on success and IllegalStateException returns if there is currently no space available.

void addFirst(E e)Copy the code

If the specified element can be inserted immediately without violating the capacity limit, the specified element is inserted in front of this two-ended queue, and IllegalStateException throws the element if there is currently no space available.

void addLast(E e)Copy the code

If the specified element can be inserted immediately without violating the capacity limit, the specified element is inserted at the end of this two-ended queue, and IllegalStateException throws the element if there is currently no space available.

boolean contains(Object o)Copy the code

True Returns if this double-ended queue contains the specified element.

Iterator<E> descendingIterator(a)Copy the code

Returns the iterators of the elements in this double-ended queue in reverse order.

E element(a)Copy the code

Retrieves, but does not delete, the head of the queue represented by this double-endian queue (in other words, the first element of this double-endian queue).

E getFirst(a)Copy the code

Retrieves, but does not delete, the first element of this double-ended queue.

E getLast(a)Copy the code

Retrieves, but does not delete, the last element of this two-ended queue.

Iterator<E> iterator(a)
Copy the code

Returns the iterators of the elements in this double-ended queue in the appropriate order.

boolean offer(E e)
Copy the code

If this can be done immediately without violating the capacity limit, the specified element is inserted into the queue represented by this two-ended queue (in other words, at the tail of this two-ended queue), true returns on success and false is currently out of space.

boolean offerFirst(E e)
Copy the code

Inserts the specified element in front of this two-ended queue unless it violates a capacity limit.

boolean offerLast(E e)
Copy the code

Inserts the specified element at the end of this double-ended queue unless it violates a capacity limit.

E peek(a)
Copy the code

Retrieves but does not delete the head of the queue represented by this two-ended queue (in other words, the first element of this two-ended queue), or null if this two-ended queue is empty.

E peekFirst(a)
Copy the code

Retrieves but does not delete the first element of this two-ended queue, or null if this two-ended queue is empty.

EpeekLast()
Copy the code

Retrieves but does not delete the last element of this two-ended queue, or null if this two-ended queue is empty.

Epoll()
Copy the code

Retrieves and removes the head of the queue represented by this double-endian queue (in other words, the first element of this double-endian queue), or null if this double-endian queue is empty.

E pollFirst(a)
Copy the code

Retrieves and deletes the first element of this two-endian queue, null returns the element if the two-endian queue is empty.

E pollLast(a)
Copy the code

Retrieves and deletes the last element of this two-endian queue, null returns the element if the two-endian queue is empty.

Epop()
Copy the code

An element pops out of the stack represented by this double-ended queue.

void push(E e)
Copy the code

If this can be done immediately without violating the capacity limit, the element is pushed onto the stack represented by this two-ended queue (in other words, at the head of this two-ended queue) and thrown if IllegalStateException currently has no space available.

E remove(a)
Copy the code

Retrieves and deletes the header of the queue represented by this double-endian queue (in other words, the first element of this double-endian queue).

boolean remove(Object o)
Copy the code

Removes the first occurrence of the specified element from this double-endian queue.

E removeFirst(a)
Copy the code

Retrieves and deletes the first element of this two-ended queue.

boolean removeFirstOccurrence(Object o)
Copy the code

Removes the first occurrence of the specified element from this double-endian queue.

E removeLast(a)
Copy the code

Retrieves and deletes the last element of this two-ended queue.

boolean removeLastOccurrence(Object o)Copy the code

Removes the last occurrence of the specified element from this double-endian queue.

int size(a)
Copy the code

Returns the number of elements in this two-ended queue.