|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protocol for queues.
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. |
Method Detail |
public void enqueue(java.lang.Object x)
x
- the item to insert.public java.lang.Object getFront()
UnderflowException
- if the queue is empty.public java.lang.Object dequeue()
UnderflowException
- if the queue is empty.public boolean isEmpty()
public void makeEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |