|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue
Method Summary | |
---|---|
java.lang.Object |
element()
Retrieves, but does not remove, the head of this queue. |
boolean |
offer(java.lang.Object o)
Inserts the specified element into this queue, if possible. |
java.lang.Object |
peek()
Retrieves, but does not remove, the head of this queue, returning null if this queue is empty. |
java.lang.Object |
poll()
Retrieves and removes the head of this queue, or null if this queue is empty. |
java.lang.Object |
remove()
Retrieves and removes the head of this queue. |
Methods inherited from interface java.util.Collection |
---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
---|
boolean offer(java.lang.Object o)
Collection.add(E)
, which can fail to
insert an element only by throwing an exception.
o
- the element to insert.
java.lang.Object poll()
java.lang.Object remove()
java.util.NoSuchElementException
- if this queue is empty.java.lang.Object peek()
java.lang.Object element()
java.util.NoSuchElementException
- if this queue is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |