|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.util.Queue
This class implements a standard thread-safe queue. Calling dequeue() will block the caller until something is placed in the queue by another thread.
Constructor Summary | |
Queue()
Constructs a new Queue |
Method Summary | |
java.lang.Object |
dequeue()
Removes an object from the front of the queue. |
void |
enqueue(java.lang.Object obj)
Puts an object at the rear of the queue. |
java.util.List |
getItems()
Returns the list of items in the queue. |
boolean |
isEmpty()
Returns true if the queue contains no items. |
void |
pushFront(java.lang.Object obj)
Puts an object at the front of the queue. |
boolean |
remove(java.lang.Object obj)
Removes an object from the queue. |
int |
size()
Returns the number of items currently in the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Queue()
Method Detail |
public void enqueue(java.lang.Object obj)
obj
- any object to enqueuepublic void pushFront(java.lang.Object obj)
obj
- the object to push-frontpublic java.lang.Object dequeue()
public boolean isEmpty()
public int size()
public java.util.List getItems()
public boolean remove(java.lang.Object obj)
obj
- the object to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |