|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.mbari.siam.core.Queue
public class Queue
| Constructor Summary | |
|---|---|
Queue()
Default Constructor |
|
Queue(int capacity)
Initializing Constructor |
|
Queue(int capacity,
QueueDispatcher dispatcher)
Initializing Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
blockingDequeue()
Block until an object is enqueued. |
java.lang.Object |
dequeue()
Retrieve and remove the next element in the queue Return null if queue is empty. |
java.lang.Object |
dequeue(int index)
Retrieve and remove the nth element in the queue Return null if queue is empty. |
java.lang.Object |
elementAt(int index)
Return element at specified index |
java.util.Enumeration |
elements()
Get enumerator over elements |
void |
enqueue(java.lang.Object o)
Place on object in the queue |
void |
getNext()
Get next object in queue and dispatch it. |
boolean |
isEmpty()
Returns true if queue is empty |
java.lang.Object |
peek()
Return Next Element without removing it from the queue |
void |
run()
Queue thread main loop |
void |
setDispatcher(QueueDispatcher dispatcher)
Set _dispatcher field |
void |
startQueue()
Begin waiting for objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Queue()
public Queue(int capacity)
public Queue(int capacity,
QueueDispatcher dispatcher)
| Method Detail |
|---|
public void setDispatcher(QueueDispatcher dispatcher)
public void enqueue(java.lang.Object o)
public java.lang.Object dequeue()
public java.lang.Object dequeue(int index)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsExceptionpublic java.lang.Object blockingDequeue()
public java.lang.Object peek()
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public java.lang.Object elementAt(int index)
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsExceptionpublic java.util.Enumeration elements()
public boolean isEmpty()
public void getNext()
public void startQueue()
public void run()
run in interface java.lang.Runnable
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||