| com.tc.util.concurrent.Queue
Queue | public interface Queue (Code) | | A generic queue interface similar to the java.util.Queue interface in the JDK 1.5 API NOTE: the interface is not
complete with respect to the JDK version. Feel free to complete it if you'd like
author: orion |
Method Summary | |
Object | element() Retrieves and removes the head of this queue, or null if this queue is empty. | boolean | isEmpty() true iff this queue is empty (ie. | boolean | offer(Object o) Inserts the specified element into this queue, if possible
Parameters: o - the element to insert. | Object | peek() Retrieves, but does not remove, the head of this queue, returning null if this queue is empty. | Object | poll() Retrieves and removes the head of this queue, or null if this queue is empty. | Object | remove() Retrieves and removes the head of this queue. |
element | Object element()(Code) | | Retrieves and removes the head of this queue, or null if this queue is empty.
the head of this queue, or null if this queue is empty. |
isEmpty | boolean isEmpty()(Code) | | true iff this queue is empty (ie. contains no elements) |
offer | boolean offer(Object o)(Code) | | Inserts the specified element into this queue, if possible
Parameters: o - the element to insert. true if it was possible to add the element to this queue, else false |
peek | Object peek()(Code) | | Retrieves, but does not remove, the head of this queue, returning null if this queue is empty.
the head of this queue, or null if this queue is empty. |
poll | Object poll()(Code) | | Retrieves and removes the head of this queue, or null if this queue is empty.
the head of this queue, or null if this queue is empty. |
remove | Object remove()(Code) | | Retrieves and removes the head of this queue. This method differs from the poll method in that it throws an
exception if this queue is empty.
the head of this queue. throws: NoSuchElementException - if this queue is empty. |
|
|