src/share/classes/java/util/Collections.java

Print this page
rev 3977 : 6546713: link the word (optional) in exception specifications to the text which provides explanation and context.

@@ -3744,13 +3744,14 @@
      * @return {@code true} if the two specified collections have no
      * elements in common.
      * @throws NullPointerException if either collection is {@code null}.
      * @throws NullPointerException if one collection contains a {@code null}
      * element and {@code null} is not an eligible element for the other collection.
-     * (optional)
+     * (<a href="Collection.html#optional-restrictions">optional</a>)
      * @throws ClassCastException if one collection contains an element that is
-     * of a type which is ineligible for the other collection. (optional)
+     * of a type which is ineligible for the other collection.
+     * (<a href="Collection.html#optional-restrictions">optional</a>)
      * @since 1.5
      */
     public static boolean disjoint(Collection<?> c1, Collection<?> c2) {
         // The collection to be used for contains(). Preference is given to
         // the collection who's contains() has lower O() complexity.