public interface QueueInterface<T>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all entries from this queue.
|
T |
dequeue()
Removes and returns the entry at the front of this queue.
|
void |
enqueue(T newEntry)
Adds a new entry to the back of this queue.
|
T |
getFront()
Retrieves the entry at the front of this queue.
|
boolean |
isEmpty()
Detects whether this queue is empty.
|
void enqueue(T newEntry)
newEntry
- An object to be added.T dequeue()
EmptyQueueException
- if the queue is empty before the operation.T getFront()
EmptyQueueException
- if the queue is empty.boolean isEmpty()
void clear()