|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjsim.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 capacity| Method Detail |
|---|
public boolean isEmpty()
public boolean isFull()
public void organize()
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - out of bounds
public void enqueue(int item)
throws java.lang.ArrayIndexOutOfBoundsException
item - item to be added
java.lang.ArrayIndexOutOfBoundsException - out of bounds
public int dequeue()
throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException - out of bounds
public 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 | ||||||||