|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.queueing.Queue
public class Queue
FILO Queue implementation
Constructor Summary | |
---|---|
Queue()
Constructs a new Queue by initializing the member LinkedList |
|
Queue(int maxDepth)
Constructs a new Queue with the given maximum depth |
Method Summary | |
---|---|
int |
getSize()
Returns the number of events contained in the queue. |
java.lang.Object |
pop()
Removes an element from the queue and returns it |
void |
push(java.lang.Object obj)
Places a new element in the queue or discards the event if the maximum depth has been reached. |
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 maxDepth)
maxDepth
- Maximum depth this queue is allowed to reach.Method Detail |
---|
public void push(java.lang.Object obj) throws QueueDiscardWarning
obj
- Object to add to queue
QueueDiscardWarning
public java.lang.Object pop() throws java.lang.InterruptedException
java.lang.InterruptedException
public int getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |