API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. LinkedBlockingDeque View Source
Author(s)
Doug Lea
Since
1.6
Version
Serial
Hierarchy
 Object
      AbstractCollection
          AbstractQueue
              LinkedBlockingDeque
Implements
 BlockingDeque
 Serializable
Subclasses
Description
public class LinkedBlockingDeque
  An optionally-bounded blocking deque based on linked nodes.
See also:   
Constructors
public LinkedBlockingDeque ()
Creates a LinkedBlockingDeque with a capacity of Integer.MAX_VALUE.
public LinkedBlockingDeque (Collection<Object> c)
  Creates a LinkedBlockingDeque with a capacity of Integer.MAX_VALUE, initially containing the elements of the given collection, added in traversal order of the collection's iterator.
public LinkedBlockingDeque (int capacity)
  Creates a LinkedBlockingDeque with the given (fixed) capacity.
Methods
Hide/Show inherited methods
public boolean add ( E e) [Overrides AbstractQueue] [Specified in BlockingDeque]
  Inserts the specified element at the end of this deque unless it would violate capacity restrictions.
public boolean addAll (Collection<Object> c) [Inherited From AbstractQueue]
  Adds all of the elements in the specified collection to this queue.
public void addFirst ( E e) [Specified in BlockingDeque]
 
public void addLast ( E e) [Specified in BlockingDeque]
 
public void clear () [Overrides AbstractQueue]
  Atomically removes all of the elements from this deque.
public boolean contains (Object o) [Overrides AbstractCollection] [Specified in BlockingDeque]
  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 ()
  Returns an iterator over the elements in this deque in reverse sequential order.
public int drainTo (Collection<Object> c)
 
public int drainTo (Collection<Object> c, int maxElements)
 
public E element () [Overrides AbstractQueue] [Specified in BlockingDeque]
  Retrieves, but does not remove, the head of the queue represented by this deque.
public E getFirst ()
 
public E getLast ()
 
public boolean isEmpty () [Inherited From AbstractCollection]
  Returns true if this collection contains no elements.
public Iterator< E> iterator () [Specified in BlockingDeque]
  Returns an iterator over the elements in this deque in proper sequence.
public boolean offer ( E e) [Specified in BlockingDeque]
 
public boolean offer ( E e, long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
 
public boolean offerFirst ( E e) [Specified in BlockingDeque]
 
public boolean offerFirst ( E e, long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
 
public boolean offerLast ( E e) [Specified in BlockingDeque]
 
public boolean offerLast ( E e, long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
 
public E peek () [Specified in BlockingDeque]
public E peekFirst ()
public E peekLast ()
public E poll () [Specified in BlockingDeque]
public E poll (long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
public E pollFirst ()
public E pollFirst (long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
public E pollLast ()
public E pollLast (long timeout, TimeUnit unit) throws InterruptedException [Specified in BlockingDeque]
public E pop ()
 
public void push ( E e) [Specified in BlockingDeque]
 
public void put ( E e) throws InterruptedException [Specified in BlockingDeque]
 
public void putFirst ( E e) throws InterruptedException [Specified in BlockingDeque]
 
public void putLast ( E e) throws InterruptedException [Specified in BlockingDeque]
 
public int remainingCapacity ()
  Returns the number of additional elements that this deque can ideally (in the absence of memory or resource constraints) accept without blocking.
public E remove () [Overrides AbstractQueue] [Specified in BlockingDeque]
  Retrieves and removes the head of the queue represented by this deque.
public boolean remove (Object o) [Overrides AbstractCollection] [Specified in BlockingDeque]
  Removes the first occurrence 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 ()
 
public boolean removeFirstOccurrence (Object o) [Specified in BlockingDeque]
public E removeLast ()
 
public boolean removeLastOccurrence (Object o) [Specified in BlockingDeque]
pack-private boolean removeNode (Node< E> e)
  Variant of removeFirstOccurrence needed by iterator.remove.
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 BlockingDeque]
  Returns the number of elements in this deque.
public E take () throws InterruptedException [Specified in BlockingDeque]
public E takeFirst () throws InterruptedException [Specified in BlockingDeque]
public E takeLast () throws InterruptedException [Specified in BlockingDeque]
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; the runtime type of the returned array is that of the specified array.
public String toString () [Overrides AbstractCollection]
Fields
Hide/Show inherited fields
Nested Classes
  LinkedBlockingDeque.Node
Doubly-linked list node class
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar