Constructor and Description |
---|
Queue() |
Modifier and Type | Method and Description |
---|---|
T |
dequeue()
Return and remove the next item (from the front) of the queue,
If queue is empty, throw EmptyQueueException
|
T |
element()
Get and do not remove the next item in the queue,
If queue is empty, throw EmptyQueueException
|
void |
enqueue(T data)
Add data to the rear of the Queue,
|
boolean |
isEmpty()
Return true iff if the Queue is empty
|
public boolean isEmpty()
QueueADT
public void enqueue(T data) throws java.lang.IllegalArgumentException
QueueADT
public T dequeue() throws java.lang.IndexOutOfBoundsException
QueueADT