|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue<AnyType>
Protocol for queues.
Method Summary | |
---|---|
AnyType |
dequeue()
Return and remove the least recently inserted item from the queue. |
void |
enqueue(AnyType x)
Insert a new item into the queue. |
AnyType |
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 |
---|
void enqueue(AnyType x)
x
- the item to insert.AnyType getFront()
UnderflowException
- if the queue is empty.AnyType dequeue()
UnderflowException
- if the queue is empty.boolean isEmpty()
void makeEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |