public interface Queue<E>
EmptyQueueException| Modifier and Type | Method and Description |
|---|---|
E |
dequeue()
Removes the element at the front of the queue.
|
void |
enqueue(E element)
Inserts an element at the rear of the queue.
|
E |
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.
|
E dequeue() throws EmptyQueueException
EmptyQueueException - if the queue is empty.void enqueue(E element)
element - new element to be inserted.E front() throws EmptyQueueException
EmptyQueueException - if the queue is empty.boolean isEmpty()
int size()