A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ArrayBlockingQueue.html below:

ArrayBlockingQueue (Java Platform SE 7 )

Modifier and Type Method and Description boolean add(E e)

Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and throwing an IllegalStateException if this queue is full.

void clear()

Atomically removes all of the elements from this queue.

boolean contains(Object o)

Returns true if this queue contains the specified element.

int drainTo(Collection<? super E> c)

Removes all available elements from this queue and adds them to the given collection.

int drainTo(Collection<? super E> c, int maxElements)

Removes at most the given number of available elements from this queue and adds them to the given collection.

Iterator<E> iterator()

Returns an iterator over the elements in this queue in proper sequence.

boolean offer(E e)

Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and false if this queue is full.

boolean offer(E e, long timeout, TimeUnit unit)

Inserts the specified element at the tail of this queue, waiting up to the specified wait time for space to become available if the queue is full.

E peek()

Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.

E poll()

Retrieves and removes the head of this queue, or returns null if this queue is empty.

E poll(long timeout, TimeUnit unit)

Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.

void put(E e)

Inserts the specified element at the tail of this queue, waiting for space to become available if the queue is full.

int remainingCapacity()

Returns the number of additional elements that this queue can ideally (in the absence of memory or resource constraints) accept without blocking.

boolean remove(Object o)

Removes a single instance of the specified element from this queue, if it is present.

int size()

Returns the number of elements in this queue.

E take()

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Object[] toArray()

Returns an array containing all of the elements in this queue, in proper sequence.

<T> T[] toArray(T[] a)

Returns an array containing all of the elements in this queue, in proper sequence; the runtime type of the returned array is that of the specified array.

String toString()

Returns a string representation of this collection.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4