|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--weiss.nonstandard.ArrayQueue
Array-based implementation of the queue.
| Constructor Summary | |
ArrayQueue()
Construct the queue. |
|
| Method Summary | |
java.lang.Object |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(java.lang.Object x)
Insert a new item into the queue. |
java.lang.Object |
getFront()
Get the least recently inserted item in the queue. |
boolean |
isEmpty()
Test if the queue is logically empty. |
void |
makeEmpty()
Make the queue logically empty. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArrayQueue()
| Method Detail |
public boolean isEmpty()
isEmpty in interface Queuepublic void makeEmpty()
makeEmpty in interface Queuepublic java.lang.Object dequeue()
dequeue in interface QueueUnderflowException - if the queue is empty.public java.lang.Object getFront()
getFront in interface QueueUnderflowException - if the queue is empty.public void enqueue(java.lang.Object x)
enqueue in interface Queuex - the item to insert.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||