27 |
|
* <p>The twelve methods described above are summarized in the |
28 |
|
* following table: |
29 |
|
* |
30 |
< |
* <p><table BORDER CELLPADDING=3 CELLSPACING=1> |
30 |
> |
* <p> |
31 |
> |
* <table BORDER CELLPADDING=3 CELLSPACING=1> |
32 |
|
* <tr> |
33 |
|
* <td></td> |
34 |
|
* <td ALIGN=CENTER COLSPAN = 2> <b>First Element (Head)</b></td> |
70 |
|
* inherited from the <tt>Queue</tt> interface are precisely equivalent to |
71 |
|
* <tt>Deque</tt> methods as indicated in the following table: |
72 |
|
* |
73 |
< |
* <p><table BORDER CELLPADDING=3 CELLSPACING=1> |
73 |
> |
* <p> |
74 |
> |
* <table BORDER CELLPADDING=3 CELLSPACING=1> |
75 |
|
* <tr> |
76 |
|
* <td ALIGN=CENTER> <b><tt>Queue</tt> Method</b></td> |
77 |
|
* <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td> |
108 |
|
* beginning of the deque. Stack methods are precisely equivalent to |
109 |
|
* <tt>Deque</tt> methods as indicated in the table below: |
110 |
|
* |
111 |
< |
* <p><table BORDER CELLPADDING=3 CELLSPACING=1> |
111 |
> |
* <p> |
112 |
> |
* <table BORDER CELLPADDING=3 CELLSPACING=1> |
113 |
|
* <tr> |
114 |
|
* <td ALIGN=CENTER> <b>Stack Method</b></td> |
115 |
|
* <td ALIGN=CENTER> <b>Equivalent <tt>Deque</tt> Method</b></td> |
234 |
|
|
235 |
|
/** |
236 |
|
* Retrieves and removes the first element of this deque. This method |
237 |
< |
* differs from the <tt>pollFirst</tt> method only in that it throws an |
237 |
> |
* differs from the {@link #pollFirst} method only in that it throws an |
238 |
|
* exception if this deque is empty. |
239 |
|
* |
240 |
|
* @return the first element of this deque |
244 |
|
|
245 |
|
/** |
246 |
|
* Retrieves and removes the last element of this deque. This method |
247 |
< |
* differs from the <tt>pollLast</tt> method only in that it throws an |
247 |
> |
* differs from the {@link #pollLast} method only in that it throws an |
248 |
|
* exception if this deque is empty. |
249 |
|
* |
250 |
|
* @return the last element of this deque |
272 |
|
|
273 |
|
/** |
274 |
|
* Retrieves, but does not remove, the first element of this |
275 |
< |
* deque. This method differs from the <tt>peekFirst</tt> method only |
275 |
> |
* deque. This method differs from the {@link #peekFirst} method only |
276 |
|
* in that it throws an exception if this deque is empty. |
277 |
|
* |
278 |
|
* @return the first element of this deque |
282 |
|
|
283 |
|
/** |
284 |
|
* Retrieves, but does not remove, the last element of this |
285 |
< |
* deque. This method differs from the <tt>peekLast</tt> method only |
285 |
> |
* deque. This method differs from the {@link #peekLast} method only |
286 |
|
* in that it throws an exception if this deque is empty. |
287 |
|
* |
288 |
|
* @return the last element of this deque |
370 |
|
|
371 |
|
/** |
372 |
|
* Retrieves and removes the head of the queue represented by this deque. |
373 |
< |
* This method differs from the <tt>poll</tt> method only in that it |
373 |
> |
* This method differs from the {@link #poll} method only in that it |
374 |
|
* throws an exception if this deque is empty. |
375 |
|
* |
376 |
|
* <p>This method is equivalent to {@link #removeFirst()}. |
393 |
|
|
394 |
|
/** |
395 |
|
* Retrieves, but does not remove, the head of the queue represented by |
396 |
< |
* this deque. This method differs from the <tt>peek</tt> method only in |
396 |
> |
* this deque. This method differs from the {@link #peek} method only in |
397 |
|
* that it throws an exception if this deque is empty. |
398 |
|
* |
399 |
|
* <p>This method is equivalent to {@link #getFirst()}. |