public class Queue
extends java.lang.Object
| Constructor and Description |
|---|
Queue() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
dequeue()
Dequeue the oldest object on the queue.
|
java.lang.Object |
dequeue(long timeOut)
Dequeue the oldest object on the queue.
|
void |
dump(java.lang.String msg) |
java.util.Enumeration |
elements()
Returns an enumeration of the elements in Last-In, First-Out
order.
|
void |
enqueue(java.lang.Object obj)
Enqueue an object.
|
boolean |
isEmpty()
Is the queue empty?
|
java.util.Enumeration |
reverseElements()
Returns an enumeration of the elements in First-In, First-Out
order.
|
public void enqueue(java.lang.Object obj)
public java.lang.Object dequeue()
throws java.lang.InterruptedException
java.lang.InterruptedException - if any thread has
interrupted this thread.public java.lang.Object dequeue(long timeOut)
throws java.lang.InterruptedException
timeOut - the number of milliseconds to wait for something
to arrive.java.lang.InterruptedException - if any thread has
interrupted this thread.public boolean isEmpty()
public final java.util.Enumeration elements()
public final java.util.Enumeration reverseElements()
public void dump(java.lang.String msg)