|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for a queue.
A queue is a collection of elements that are inserted and removed according to the first-in first-out principle.
QueueEmptyException,
Stack,
Deque| Method Summary | |
java.lang.Object |
dequeue()
Remove the element at the front. |
void |
enqueue(java.lang.Object element)
Insert an element at the rear. |
java.lang.Object |
front()
Inspect the element at the front, without removing it or otherwise changing the queue. |
boolean |
isEmpty()
Return true if and only if the queue is empty. |
int |
size()
Return the number of elements. |
| Method Detail |
public int size()
public boolean isEmpty()
public java.lang.Object front()
throws QueueEmptyException
public void enqueue(java.lang.Object element)
element - new element to be inserted.
public java.lang.Object dequeue()
throws QueueEmptyException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||