185 |
|
|
186 |
|
/** |
187 |
|
* Adds the specified element as the last element of this deque, |
188 |
< |
* waiting if necessary for space to become available. This |
189 |
< |
* method is equivalent to putLast. |
188 |
> |
* waiting if necessary for space to become available. |
189 |
> |
* |
190 |
> |
* <p>This method is equivalent to {@link #putLast}. |
191 |
> |
* |
192 |
|
* @param o the element to add |
193 |
|
* @throws InterruptedException if interrupted while waiting. |
194 |
|
* @throws NullPointerException if the specified element is <tt>null</tt>. |
201 |
|
* insertion restrictions (for example capacity bounds), method |
202 |
|
* <tt>offer</tt> is generally preferable to method {@link |
203 |
|
* Collection#add}, which can fail to insert an element only by |
204 |
< |
* throwing an exception. This method is equivalent to |
205 |
< |
* offerLast. |
204 |
> |
* throwing an exception. |
205 |
> |
* |
206 |
> |
* <p>This method is equivalent to {@link #offerLast}. |
207 |
|
* |
208 |
|
* @param o the element to add. |
209 |
|
* @return <tt>true</tt> if it was possible to add the element to |
216 |
|
/** |
217 |
|
* Retrieves and removes the first element of this deque, waiting |
218 |
|
* if no elements are present on this deque. |
219 |
< |
* This method is equivalent to takeFirst. |
219 |
> |
* |
220 |
> |
* <p>This method is equivalent to {@link #takeFirst}. |
221 |
> |
* |
222 |
|
* @return the head of this deque |
223 |
|
* @throws InterruptedException if interrupted while waiting. |
224 |
|
*/ |
227 |
|
/** |
228 |
|
* Retrieves and removes the first element of this deque, waiting |
229 |
|
* if necessary up to the specified wait time if no elements are |
230 |
< |
* present on this deque. This method is equivalent to |
231 |
< |
* pollFirst. |
230 |
> |
* present on this deque. |
231 |
> |
* |
232 |
> |
* <p>This method is equivalent to {@link #pollFirst}. |
233 |
> |
* |
234 |
|
* @param timeout how long to wait before giving up, in units of |
235 |
|
* <tt>unit</tt> |
236 |
|
* @param unit a <tt>TimeUnit</tt> determining how to interpret the |