|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.neem.impl.Queue
public class Queue
Implementation of a FIFO queue with random purging.
Field Summary | |
---|---|
int |
max
|
Constructor Summary | |
---|---|
Queue(int max,
java.util.Random random)
Creates a new queue. |
Method Summary | |
---|---|
boolean |
isEmpty()
|
Queued |
pop()
Retrieves (dequeues) an Object from this queue. |
void |
push(Queued o)
Inserts (enqueues) an Object to this queue. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int max
Constructor Detail |
---|
public Queue(int max, java.util.Random random)
max
- The maximum number of elements this queue can hold.random
- Method Detail |
---|
public void push(Queued o)
o
- The object to be enqueued.public Queued pop()
public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |