src/share/classes/java/util/Vector.java

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

*** 891,904 **** * * @param c a collection of elements to be removed from the Vector * @return true if this Vector changed as a result of the call * @throws ClassCastException if the types of one or more elements * in this vector are incompatible with the specified ! * collection (optional) * @throws NullPointerException if this vector contains one or more null * elements and the specified collection does not support null ! * elements (optional), or if the specified collection is null * @since 1.2 */ public synchronized boolean removeAll(Collection<?> c) { return super.removeAll(c); } --- 891,907 ---- * * @param c a collection of elements to be removed from the Vector * @return true if this Vector changed as a result of the call * @throws ClassCastException if the types of one or more elements * in this vector are incompatible with the specified ! * collection ! * (<a href="Collection.html#optional-restrictions">optional</a>) * @throws NullPointerException if this vector contains one or more null * elements and the specified collection does not support null ! * elements ! * (<a href="Collection.html#optional-restrictions">optional</a>), ! * or if the specified collection is null * @since 1.2 */ public synchronized boolean removeAll(Collection<?> c) { return super.removeAll(c); }
*** 911,924 **** * @param c a collection of elements to be retained in this Vector * (all other elements are removed) * @return true if this Vector changed as a result of the call * @throws ClassCastException if the types of one or more elements * in this vector are incompatible with the specified ! * collection (optional) * @throws NullPointerException if this vector contains one or more null * elements and the specified collection does not support null ! * elements (optional), or if the specified collection is null * @since 1.2 */ public synchronized boolean retainAll(Collection<?> c) { return super.retainAll(c); } --- 914,930 ---- * @param c a collection of elements to be retained in this Vector * (all other elements are removed) * @return true if this Vector changed as a result of the call * @throws ClassCastException if the types of one or more elements * in this vector are incompatible with the specified ! * collection ! * (<a href="Collection.html#optional-restrictions">optional</a>) * @throws NullPointerException if this vector contains one or more null * elements and the specified collection does not support null ! * elements ! * (<a href="Collection.html#optional-restrictions">optional</a>), ! * or if the specified collection is null * @since 1.2 */ public synchronized boolean retainAll(Collection<?> c) { return super.retainAll(c); }