|
datastructures | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for a queue: a collection of elements that are inserted and removed according to the first-in first-out principle.
EmptyQueueException| Method Summary | |
Object |
dequeue()
Removes the element at the front of the queue. |
void |
enqueue(Object element)
Inserts an element at the rear of the queue. |
Object |
front()
Inspects the element at the front of the queue. |
boolean |
isEmpty()
Returns whether the queue is empty. |
int |
size()
Returns the number of elements in the queue. |
| Method Detail |
public int size()
public boolean isEmpty()
public Object front()
throws EmptyQueueException
EmptyQueueException - if the queue is empty.public void enqueue(Object element)
element - new element to be inserted.
public Object dequeue()
throws EmptyQueueException
EmptyQueueException - if the queue is empty.
|
datastructures | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||