ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/Deque.java
(Generate patch)

Comparing jsr166/src/main/java/util/Deque.java (file contents):
Revision 1.40 by jsr166, Wed Aug 23 20:17:53 2017 UTC vs.
Revision 1.42 by jsr166, Mon Oct 1 00:10:53 2018 UTC

# Line 112 | Line 112 | package java.util;
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>
# Line 134 | Line 134 | package java.util;
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>
# Line 164 | Line 164 | package java.util;
164   * {@code Object}.
165   *
166   * <p>This interface is a member of the
167 < * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
167 > * <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
168   * Java Collections Framework</a>.
169   *
170   * @author Doug Lea
# Line 334 | Line 334 | public interface Deque<E> extends Queue<
334       * @return {@code true} if an element was removed as a result of this call
335       * @throws ClassCastException if the class of the specified element
336       *         is incompatible with this deque
337 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
337 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
338       * @throws NullPointerException if the specified element is null and this
339       *         deque does not permit null elements
340 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
340 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
341       */
342      boolean removeFirstOccurrence(Object o);
343  
# Line 353 | Line 353 | public interface Deque<E> extends Queue<
353       * @return {@code true} if an element was removed as a result of this call
354       * @throws ClassCastException if the class of the specified element
355       *         is incompatible with this deque
356 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
356 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
357       * @throws NullPointerException if the specified element is null and this
358       *         deque does not permit null elements
359 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
359 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
360       */
361      boolean removeLastOccurrence(Object o);
362  
# Line 536 | Line 536 | public interface Deque<E> extends Queue<
536       * @return {@code true} if an element was removed as a result of this call
537       * @throws ClassCastException if the class of the specified element
538       *         is incompatible with this deque
539 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
539 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
540       * @throws NullPointerException if the specified element is null and this
541       *         deque does not permit null elements
542 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
542 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
543       */
544      boolean remove(Object o);
545  
# Line 552 | Line 552 | public interface Deque<E> extends Queue<
552       * @return {@code true} if this deque contains the specified element
553       * @throws ClassCastException if the class of the specified element
554       *         is incompatible with this deque
555 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
555 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
556       * @throws NullPointerException if the specified element is null and this
557       *         deque does not permit null elements
558 <     * (<a href="{@docRoot}/../api/java/util/Collection.html#optional-restrictions">optional</a>)
558 >     * (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
559       */
560      boolean contains(Object o);
561  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines