|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsim.jmodel.QueueSet
public class QueueSet
The QueueSet class inserts and removes items in FIFO order, but also provides an organaize method to eliminate duplicate items.
Constructor Summary | |
---|---|
QueueSet(int size)
Constructor for QueueSet. |
Method Summary | |
---|---|
int |
dequeue()
Remove the item at the front of the queue. |
void |
enqueue(int item)
Insert an item on the back of the queue. |
int |
getFront()
Get the item at the front of the queue. |
boolean |
isEmpty()
Is the Queue Empty? |
boolean |
isFull()
Is the Queue full? |
void |
organize()
Organize the queue to generate the correct order for Generator. |
void |
reset()
Reset the Queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueSet(int size)
size
- queue capacityMethod Detail |
---|
public boolean isEmpty()
public boolean isFull()
public void organize() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- out of boundspublic void enqueue(int item) throws java.lang.ArrayIndexOutOfBoundsException
item
- item to be added
java.lang.ArrayIndexOutOfBoundsException
- out of boundspublic int dequeue() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- out of boundspublic int getFront() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- out of boundspublic void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |