|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
T - The type of data that the queue stores.public interface Queue<T>
An interface for the Queue ADT.
| Method Summary | |
|---|---|
void |
clear()
Removes all items from the queue. |
T |
dequeue()
Removes an item from the front of the queue and returns it. |
void |
enqueue(T item)
Adds the given item to the back of the queue. |
boolean |
isEmpty()
Returns true if the queue is empty. |
T |
peek()
Returns the item at the front of the queue, without removing it. |
| Method Detail |
|---|
void enqueue(T item)
item - the item to addT dequeue()
T peek()
boolean isEmpty()
void clear()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||