96 |
|
boolean offer(E o); |
97 |
|
|
98 |
|
/** |
99 |
< |
* Retrieves and removes the head of this queue, if it is available. |
99 |
> |
* Retrieves and removes the head of this queue, or <tt>null</tt> |
100 |
> |
* if this queue is empty. |
101 |
|
* |
102 |
|
* @return the head of this queue, or <tt>null</tt> if this |
103 |
|
* queue is empty. |
105 |
|
E poll(); |
106 |
|
|
107 |
|
/** |
108 |
< |
* Retrieves and removes the head of this queue. |
109 |
< |
* This method differs |
110 |
< |
* from the <tt>poll</tt> method in that it throws an exception if this |
110 |
< |
* queue is empty. |
108 |
> |
* Retrieves and removes the head of this queue. This method |
109 |
> |
* differs from the <tt>poll</tt> method in that it throws an |
110 |
> |
* exception if this queue is empty. |
111 |
|
* |
112 |
|
* @return the head of this queue. |
113 |
|
* @throws NoSuchElementException if this queue is empty. |
115 |
|
E remove(); |
116 |
|
|
117 |
|
/** |
118 |
< |
* Retrieves, but does not remove, the head of this queue. |
119 |
< |
* This method differs from the <tt>poll</tt> |
120 |
< |
* method only in that this method does not remove the head element from |
121 |
< |
* this queue. |
118 |
> |
* Retrieves, but does not remove, the head of this queue, |
119 |
> |
* returning <tt>null</tt> if this queue is empty. |
120 |
|
* |
121 |
< |
* @return the head of this queue, or <tt>null</tt> if this queue is empty. |
121 |
> |
* @return the head of this queue, or <tt>null</tt> if this queue |
122 |
> |
* is empty. |
123 |
|
*/ |
124 |
|
E peek(); |
125 |
|
|