public class TArrayBlockingQueue<E> extends TAbstractQueue<E> implements TBlockingQueue<E>
Constructor and Description |
---|
TArrayBlockingQueue(int capacity) |
TArrayBlockingQueue(int capacity,
boolean fair) |
TArrayBlockingQueue(int capacity,
boolean fair,
Collection<? extends E> c) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
clear() |
boolean |
contains(Object o) |
int |
drainTo(TCollection<? super E> c) |
int |
drainTo(TCollection<? super E> c,
int maxElements) |
boolean |
isEmpty() |
TIterator<E> |
iterator() |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
TTimeUnit unit) |
E |
peek() |
E |
poll() |
E |
poll(long timeout,
TTimeUnit unit) |
void |
put(E e) |
int |
remainingCapacity() |
boolean |
remove(Object o) |
int |
size() |
E |
take() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
addAll, element, remove
containsAll, removeAll, retainAll, toString
clone, equals, equals0, finalize, getClass0, hashCode, notify0, notifyAll0, wait0, wait0, waitImpl
addAll, containsAll, removeAll, retainAll, spliterator, stream
public TArrayBlockingQueue(int capacity)
public TArrayBlockingQueue(int capacity, boolean fair)
public TArrayBlockingQueue(int capacity, boolean fair, Collection<? extends E> c)
public boolean add(E e)
add
in interface TCollection<E>
add
in class TAbstractQueue<E>
public void put(E e) throws InterruptedException
put
in interface TBlockingQueue<E>
InterruptedException
public boolean offer(E e, long timeout, TTimeUnit unit) throws InterruptedException
offer
in interface TBlockingQueue<E>
InterruptedException
public E take() throws InterruptedException
take
in interface TBlockingQueue<E>
InterruptedException
public E poll(long timeout, TTimeUnit unit) throws InterruptedException
poll
in interface TBlockingQueue<E>
InterruptedException
public int size()
size
in interface TCollection<E>
public boolean isEmpty()
isEmpty
in interface TCollection<E>
isEmpty
in class TAbstractCollection<E>
public int remainingCapacity()
remainingCapacity
in interface TBlockingQueue<E>
public boolean remove(Object o)
remove
in interface TCollection<E>
remove
in class TAbstractCollection<E>
public boolean contains(Object o)
contains
in interface TCollection<E>
contains
in class TAbstractCollection<E>
public Object[] toArray()
toArray
in interface TCollection<E>
toArray
in class TAbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface TCollection<E>
toArray
in class TAbstractCollection<E>
public void clear()
clear
in interface TCollection<E>
clear
in class TAbstractQueue<E>
public int drainTo(TCollection<? super E> c)
drainTo
in interface TBlockingQueue<E>
public int drainTo(TCollection<? super E> c, int maxElements)
drainTo
in interface TBlockingQueue<E>
Copyright © 2019. All rights reserved.