E - element typepublic class BlockingQueue<E>
extends java.lang.Object
| Constructor and Description |
|---|
BlockingQueue() |
| Modifier and Type | Method and Description |
|---|---|
E |
get()
Get first element and remove it from the queue.
|
void |
get(E object) |
boolean |
isEmpty()
Return whether the queue is empty
|
E |
peek()
Get first element from the queue.
|
void |
put(E object) |
int |
size()
Get the current number of elements in the queue
|
public E get()
public void get(E object)
object - object to try to getpublic boolean isEmpty()
public E peek()
public void put(E object)
object - object to add to queuepublic int size()