public class WaitingQueue extends Queue
| Constructor and Description |
|---|
WaitingQueue() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addElement(java.lang.Object o,
int index)
Adds element to vector at specified position.
|
void |
clear()
Removes all entries from this queue and notifies all waiting thread.
|
protected java.lang.Object |
getFirstElement()
Returns the first element of this queue.
|
Iterator |
iterator()
Returns an iterator for this queue.
|
checkFirst, checkFirstElement, enqueue, enqueueAtBeginning, get, isEmpty, sizeprotected java.lang.Object getFirstElement()
QueuegetFirstElement in class Queueprotected void addElement(java.lang.Object o,
int index)
QueueaddElement in class Queueo - object to add.index - where to insert the object. If -1, the object will be added at the end.public Iterator iterator()
This iterator allows to access every item inside this queue. If an element is removed using this iterator the waiting thread will be notified.