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.35 by jsr166, Wed Apr 19 23:45:50 2017 UTC vs.
Revision 1.39 by jsr166, Wed May 31 19:02:33 2017 UTC

# Line 27 | Line 27 | package java.util;
27   * <p>The twelve methods described above are summarized in the
28   * following table:
29   *
30 < * <table BORDER CELLPADDING=3 CELLSPACING=1>
30 > * <table class="plain">
31   * <caption>Summary of Deque methods</caption>
32   *  <tr>
33   *    <td></td>
34 < *    <td ALIGN=CENTER COLSPAN = 2> <b>First Element (Head)</b></td>
35 < *    <td ALIGN=CENTER COLSPAN = 2> <b>Last Element (Tail)</b></td>
34 > *    <td style="text-align:center" COLSPAN = 2> <b>First Element (Head)</b></td>
35 > *    <td style="text-align:center" COLSPAN = 2> <b>Last Element (Tail)</b></td>
36   *  </tr>
37   *  <tr>
38   *    <td></td>
39 < *    <td ALIGN=CENTER><em>Throws exception</em></td>
40 < *    <td ALIGN=CENTER><em>Special value</em></td>
41 < *    <td ALIGN=CENTER><em>Throws exception</em></td>
42 < *    <td ALIGN=CENTER><em>Special value</em></td>
39 > *    <td style="text-align:center"><em>Throws exception</em></td>
40 > *    <td style="text-align:center"><em>Special value</em></td>
41 > *    <td style="text-align:center"><em>Throws exception</em></td>
42 > *    <td style="text-align:center"><em>Special value</em></td>
43   *  </tr>
44   *  <tr>
45   *    <td><b>Insert</b></td>
# Line 70 | Line 70 | package java.util;
70   * inherited from the {@code Queue} interface are precisely equivalent to
71   * {@code Deque} methods as indicated in the following table:
72   *
73 < * <table BORDER CELLPADDING=3 CELLSPACING=1>
73 > * <table class="plain">
74   * <caption>Comparison of Queue and Deque methods</caption>
75   *  <tr>
76 < *    <td ALIGN=CENTER> <b>{@code Queue} Method</b></td>
77 < *    <td ALIGN=CENTER> <b>Equivalent {@code Deque} Method</b></td>
76 > *    <td style="text-align:center"> <b>{@code Queue} Method</b></td>
77 > *    <td style="text-align:center"> <b>Equivalent {@code Deque} Method</b></td>
78   *  </tr>
79   *  <tr>
80   *    <td>{@link #add(Object) add(e)}</td>
# Line 108 | Line 108 | package java.util;
108   * beginning of the deque.  Stack methods are precisely equivalent to
109   * {@code Deque} methods as indicated in the table below:
110   *
111 < * <table BORDER CELLPADDING=3 CELLSPACING=1>
111 > * <table class="plain">
112   * <caption>Comparison of Stack and Deque methods</caption>
113   *  <tr>
114 < *    <td ALIGN=CENTER> <b>Stack Method</b></td>
115 < *    <td ALIGN=CENTER> <b>Equivalent {@code Deque} Method</b></td>
114 > *    <td style="text-align:center"> <b>Stack Method</b></td>
115 > *    <td style="text-align:center"> <b>Equivalent {@code Deque} Method</b></td>
116   *  </tr>
117   *  <tr>
118   *    <td>{@link #push(Object) push(e)}</td>
# Line 152 | Line 152 | package java.util;
152   * methods, but instead inherit the identity-based versions from class
153   * {@code Object}.
154   *
155 < * <p>This interface is a member of the <a
156 < * href="{@docRoot}/../technotes/guides/collections/index.html"> Java Collections
157 < * Framework</a>.
155 > * <p>This interface is a member of the
156 > * <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
157 > * Java Collections Framework</a>.
158   *
159   * @author Doug Lea
160   * @author Josh Bloch
# Line 448 | Line 448 | public interface Deque<E> extends Queue<
448       */
449      E peek();
450  
451 +    /**
452 +     * Adds all of the elements in the specified collection at the end
453 +     * of this deque, as if by calling {@link #addLast} on each one,
454 +     * in the order that they are returned by the collection's iterator.
455 +     *
456 +     * <p>When using a capacity-restricted deque, it is generally preferable
457 +     * to call {@link #offer(Object) offer} separately on each element.
458 +     *
459 +     * <p>An exception encountered while trying to add an element may result
460 +     * in only some of the elements having been successfully added when
461 +     * the associated exception is thrown.
462 +     *
463 +     * @param c the elements to be inserted into this deque
464 +     * @return {@code true} if this deque changed as a result of the call
465 +     * @throws IllegalStateException if not all the elements can be added at
466 +     *         this time due to insertion restrictions
467 +     * @throws ClassCastException if the class of an element of the specified
468 +     *         collection prevents it from being added to this deque
469 +     * @throws NullPointerException if the specified collection contains a
470 +     *         null element and this deque does not permit null elements,
471 +     *         or if the specified collection is null
472 +     * @throws IllegalArgumentException if some property of an element of the
473 +     *         specified collection prevents it from being added to this deque
474 +     */
475 +    boolean addAll(Collection<? extends E> c);
476  
477      // *** Stack methods ***
478  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines