class Queue extends Object
Modifier and Type | Field and Description |
---|---|
private List |
lst
List we actually store stuff in
|
Constructor and Description |
---|
Queue() |
Modifier and Type | Method and Description |
---|---|
(package private) Object |
dequeue()
Block until the queue is non-empty and return the first item.
|
(package private) void |
enqueue(Object o)
Enqueue an item.
|
private final List lst
void enqueue(Object o)
Object dequeue() throws InterruptedException
InterruptedException
- if the current thread is interrupted
while the queue is waiting for an item to appearCopyright 2007-2016, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.