|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue
A kind of collection provides advanced operations than other basic collections, such as insertion, extraction, and inspection. Generally, a queue orders its elements by means of first-in-first-out. While priority queue orders its elements according to a comparator specified or the elements' natural order. Furthermore, a stack orders its elements last-in-first out. A typical queue does not allow null to be inserted as its element, while some implementations such as LinkedList allow it. But null should not be inserted even in these implementations, since method poll return null to indicate that there is no element left in the queue. Queue does not provide blocking queue methods, which will block until the operation of the method is allowed. BlockingQueue interface defines such methods.
Method Summary | |
---|---|
java.lang.Object |
element()
Gets but not removes the element in the head of the queue. |
boolean |
offer(java.lang.Object o)
Inserts the specified element into the queue provided that the condition allows such an operation. |
java.lang.Object |
peek()
Gets but not removes the element in the head of the queue, or throws exception if there is no element in the queue. |
java.lang.Object |
poll()
Gets and removes the element in the head of the queue, or returns null if there is no element in the queue. |
java.lang.Object |
remove()
Gets and removes the element in the head of the queue. |
Methods inherited from interface oracle.adfnmc.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)
o
- the specified element to insert into the queue.
java.lang.Object poll()
java.lang.Object remove()
NoSuchElementException
- if there is no element in the queue.java.lang.Object peek()
java.lang.Object element()
NoSuchElementException
- if there is no element in the queue.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |