|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
public interface Queue<T>
This is the ever absent interface from java.util package. Although a
new Queue interface is introduced since java 5.0, it is
mainly for concurrent messaging. And it is heavily burdened to support java
collection framework. So this interface and implementation classes still have
reasons to exist.
| Method Summary | ||
|---|---|---|
void |
clear()
clear all |
|
T |
dequeue()
remove the first element from the queue and return it. |
|
|
enqueue(V o)
add o to the end of the queue. |
|
void |
enqueueAll(Collection<? extends T> collection)
add all objects in collection to end of the queue. |
|
boolean |
isEmpty()
test whether this queue is empty. |
|
T |
peek()
return the first element in the queue but don't remove it from the queue. |
|
|
precede(V o)
add o to the beginning of the queue. |
|
int |
size()
return size of the queue. |
|
| Method Detail |
|---|
<V extends T> void enqueue(V o)
o - void enqueueAll(Collection<? extends T> collection)
collection - <V extends T> void precede(V o)
o - boolean isEmpty()
T peek()
T dequeue()
int size()
void clear()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||