274 |
|
|
275 |
|
/** |
276 |
|
* Retrieves and removes the first element of this deque. This method |
277 |
< |
* differs from the <tt>pollFirst</tt> method in that it throws an |
277 |
> |
* differs from the {@link #pollFirst} method only in that it throws an |
278 |
|
* exception if this deque is empty. |
279 |
|
* |
280 |
|
* @return the first element of this deque |
289 |
|
|
290 |
|
/** |
291 |
|
* Retrieves and removes the last element of this deque. This method |
292 |
< |
* differs from the <tt>pollLast</tt> method in that it throws an |
292 |
> |
* differs from the {@link #pollLast} method only in that it throws an |
293 |
|
* exception if this deque is empty. |
294 |
|
* |
295 |
|
* @return the last element of this deque |
326 |
|
|
327 |
|
/** |
328 |
|
* Retrieves, but does not remove, the first element of this |
329 |
< |
* deque. This method differs from the <tt>peekFirst</tt> method only |
329 |
> |
* deque. This method differs from the {@link #peekFirst} method only |
330 |
|
* in that it throws an exception if this deque is empty. |
331 |
|
* |
332 |
|
* @return the first element of this deque |
341 |
|
|
342 |
|
/** |
343 |
|
* Retrieves, but does not remove, the last element of this |
344 |
< |
* deque. This method differs from the <tt>peekLast</tt> method only |
344 |
> |
* deque. This method differs from the {@link #peekLast} method only |
345 |
|
* in that it throws an exception if this deque is empty. |
346 |
|
* |
347 |
|
* @return the last element of this deque |
452 |
|
|
453 |
|
/** |
454 |
|
* Retrieves and removes the head of the queue represented by this deque. |
455 |
< |
* This method differs from the <tt>poll</tt> method in that it throws an |
456 |
< |
* exception if this deque is empty. |
455 |
> |
* This method differs from the {@link #poll} method only in that it |
456 |
> |
* throws an exception if this deque is empty. |
457 |
|
* |
458 |
|
* <p>This method is equivalent to {@link #removeFirst}. |
459 |
|
* |
468 |
|
* Retrieves, but does not remove, the head of the queue represented by |
469 |
|
* this deque, returning <tt>null</tt> if this deque is empty. |
470 |
|
* |
471 |
< |
* <p>This method is equivalent to {@link #peekFirst} |
471 |
> |
* <p>This method is equivalent to {@link #peekFirst}. |
472 |
|
* |
473 |
|
* @return the head of the queue represented by this deque, or |
474 |
|
* <tt>null</tt> if this deque is empty |
479 |
|
|
480 |
|
/** |
481 |
|
* Retrieves, but does not remove, the head of the queue represented by |
482 |
< |
* this deque. This method differs from the <tt>peek</tt> method only in |
482 |
> |
* this deque. This method differs from the {@link #peek} method only in |
483 |
|
* that it throws an exception if this deque is empty. |
484 |
|
* |
485 |
< |
* <p>This method is equivalent to {@link #getFirst} |
485 |
> |
* <p>This method is equivalent to {@link #getFirst}. |
486 |
|
* |
487 |
|
* @return the head of the queue represented by this deque |
488 |
|
* @throws NoSuchElementException if this deque is empty |