112 |
|
* <p>Deques can also be used as LIFO (Last-In-First-Out) stacks. This |
113 |
|
* interface should be used in preference to the legacy {@link Stack} class. |
114 |
|
* When a deque is used as a stack, elements are pushed and popped from the |
115 |
< |
* beginning of the deque. Stack methods are precisely equivalent to |
116 |
< |
* {@code Deque} methods as indicated in the table below: |
115 |
> |
* beginning of the deque. Stack methods are equivalent to {@code Deque} |
116 |
> |
* methods as indicated in the table below: |
117 |
|
* |
118 |
|
* <table class="striped"> |
119 |
|
* <caption>Comparison of Stack and Deque methods</caption> |
134 |
|
* </tr> |
135 |
|
* <tr> |
136 |
|
* <th scope="row">{@link #peek() peek()}</th> |
137 |
< |
* <td>{@link #peekFirst() peekFirst()}</td> |
137 |
> |
* <td>{@link #getFirst() getFirst()}</td> |
138 |
|
* </tr> |
139 |
|
* </tbody> |
140 |
|
* </table> |