API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. ArrayDeque View Source
Author(s)
Josh Bloch and Doug Lea
Since
1.6
Version
Serial
Hierarchy
 Object
      AbstractCollection
          ArrayDeque
Implements
 Deque
 Cloneable
 Serializable
Subclasses
Description
public class ArrayDeque
  Resizable-array implementation of the Deque interface.
See also:   
Constructors
public ArrayDeque ()
Constructs an empty array deque with an initial capacity sufficient to hold 16 elements.
public ArrayDeque (Collection<Object> c)
  Constructs a deque containing the elements of the specified collection, in the order they are returned by the collection's iterator.
public ArrayDeque (int numElements)
  Constructs an empty array deque with an initial capacity sufficient to hold the specified number of elements.
Methods
Hide/Show inherited methods
public boolean add ( E e) [Overrides AbstractCollection] [Specified in Deque]
  Inserts the specified element at the end of this deque.
public boolean addAll (Collection<Object> c) [Inherited From AbstractCollection]
  Adds all of the elements in the specified collection to this collection (optional operation).
public void addFirst ( E e) [Specified in Deque]
  Inserts the specified element at the front of this deque.
public void addLast ( E e) [Specified in Deque]
  Inserts the specified element at the end of this deque.
public void clear () [Overrides AbstractCollection]
  Removes all of the elements from this deque.
public ArrayDeque< E> clone ()
  Returns a copy of this deque.
public boolean contains (Object o) [Overrides AbstractCollection] [Specified in Deque]
  Returns true if this deque contains the specified element.
public boolean containsAll (Collection<Object> c) [Inherited From AbstractCollection]
  Returns true if this collection contains all of the elements in the specified collection.
public Iterator< E> descendingIterator () [Specified in Deque]
public E element () [Specified in Deque]
  Retrieves, but does not remove, the head of the queue represented by this deque.
public E getFirst () [Specified in Deque]
 
public E getLast () [Specified in Deque]
 
public boolean isEmpty () [Overrides AbstractCollection]
  Returns true if this deque contains no elements.
public Iterator< E> iterator () [Specified in Deque]
  Returns an iterator over the elements in this deque.
public boolean offer ( E e) [Specified in Deque]
  Inserts the specified element at the end of this deque.
public boolean offerFirst ( E e) [Specified in Deque]
  Inserts the specified element at the front of this deque.
public boolean offerLast ( E e) [Specified in Deque]
  Inserts the specified element at the end of this deque.
public E peek () [Specified in Deque]
  Retrieves, but does not remove, the head of the queue represented by this deque, or returns null if this deque is empty.
public E peekFirst () [Specified in Deque]
public E peekLast () [Specified in Deque]
public E poll () [Specified in Deque]
  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.
public E pollFirst () [Specified in Deque]
public E pollLast () [Specified in Deque]
public E pop () [Specified in Deque]
  Pops an element from the stack represented by this deque.
public void push ( E e) [Specified in Deque]
  Pushes an element onto the stack represented by this deque.
public E remove () [Specified in Deque]
  Retrieves and removes the head of the queue represented by this deque.
public boolean remove (Object o) [Overrides AbstractCollection] [Specified in Deque]
  Removes a single instance of the specified element from this deque.
public boolean removeAll (Collection<Object> c) [Inherited From AbstractCollection]
  Removes all of this collection's elements that are also contained in the specified collection (optional operation).
public E removeFirst () [Specified in Deque]
 
public boolean removeFirstOccurrence (Object o) [Specified in Deque]
  Removes the first occurrence of the specified element in this deque (when traversing the deque from head to tail).
public E removeLast () [Specified in Deque]
 
public boolean removeLastOccurrence (Object o) [Specified in Deque]
  Removes the last occurrence of the specified element in this deque (when traversing the deque from head to tail).
public boolean retainAll (Collection<Object> c) [Inherited From AbstractCollection]
  Retains only the elements in this collection that are contained in the specified collection (optional operation).
public int size () [Specified in Deque]
  Returns the number of elements in this deque.
public Object toArray () [Overrides AbstractCollection]
  Returns an array containing all of the elements in this deque in proper sequence (from first to last element).
public T toArray ( T a) [Overrides AbstractCollection]
  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.
public String toString () [Inherited From AbstractCollection]
  Returns a string representation of this collection.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar