Collection.java, [...]: Added additional exceptions to documentation.
2004-08-01 Andrew John Hughes <gnu_andrew@member.fsf.org> * java/util/Collection.java, java/util/List.java, java/util/Map.java, java/util/Set.java, java/util/SortedMap.java, java/util/SortedSet.java: Added additional exceptions to documentation. From-SVN: r85403
This commit is contained in:
parent
5b5662eea7
commit
b828123e23
7 changed files with 111 additions and 6 deletions
|
@ -94,6 +94,8 @@ public interface Collection
|
|||
* support the add operation.
|
||||
* @throws ClassCastException if o cannot be added to this collection due
|
||||
* to its type.
|
||||
* @throws NullPointerException if o is null and this collection doesn't
|
||||
* support the addition of null values.
|
||||
* @throws IllegalArgumentException if o cannot be added to this
|
||||
* collection for some other reason.
|
||||
*/
|
||||
|
@ -108,6 +110,9 @@ public interface Collection
|
|||
* support the addAll operation.
|
||||
* @throws ClassCastException if some element of c cannot be added to this
|
||||
* collection due to its type.
|
||||
* @throws NullPointerException if some element of c is null and this
|
||||
* collection does not support the addition of null values.
|
||||
* @throws NullPointerException if c itself is null.
|
||||
* @throws IllegalArgumentException if some element of c cannot be added
|
||||
* to this collection for some other reason.
|
||||
*/
|
||||
|
@ -129,6 +134,10 @@ public interface Collection
|
|||
* @param o the element to look for.
|
||||
* @return true if this collection contains at least one element e such that
|
||||
* <code>o == null ? e == null : o.equals(e)</code>.
|
||||
* @throws ClassCastException if the type of o is not a valid type for this
|
||||
* collection.
|
||||
* @throws NullPointerException if o is null and this collection doesn't
|
||||
* support null values.
|
||||
*/
|
||||
boolean contains(Object o);
|
||||
|
||||
|
@ -137,6 +146,11 @@ public interface Collection
|
|||
*
|
||||
* @param c the collection to test for.
|
||||
* @return true if for every element o in c, contains(o) would return true.
|
||||
* @throws ClassCastException if the type of any element in c is not a valid
|
||||
* type for this collection.
|
||||
* @throws NullPointerException if some element of c is null and this
|
||||
* collection does not support null values.
|
||||
* @throws NullPointerException if c itself is null.
|
||||
*/
|
||||
boolean containsAll(Collection c);
|
||||
|
||||
|
@ -198,6 +212,10 @@ public interface Collection
|
|||
* if the collection contained at least one occurrence of o.
|
||||
* @throws UnsupportedOperationException if this collection does not
|
||||
* support the remove operation.
|
||||
* @throws ClassCastException if the type of o is not a valid type
|
||||
* for this collection.
|
||||
* @throws NullPointerException if o is null and the collection doesn't
|
||||
* support null values.
|
||||
*/
|
||||
boolean remove(Object o);
|
||||
|
||||
|
@ -208,6 +226,11 @@ public interface Collection
|
|||
* @return true if this collection was modified as a result of this call.
|
||||
* @throws UnsupportedOperationException if this collection does not
|
||||
* support the removeAll operation.
|
||||
* @throws ClassCastException if the type of any element in c is not a valid
|
||||
* type for this collection.
|
||||
* @throws NullPointerException if some element of c is null and this
|
||||
* collection does not support removing null values.
|
||||
* @throws NullPointerException if c itself is null.
|
||||
*/
|
||||
boolean removeAll(Collection c);
|
||||
|
||||
|
@ -218,6 +241,11 @@ public interface Collection
|
|||
* @return true if this collection was modified as a result of this call.
|
||||
* @throws UnsupportedOperationException if this collection does not
|
||||
* support the retainAll operation.
|
||||
* @throws ClassCastException if the type of any element in c is not a valid
|
||||
* type for this collection.
|
||||
* @throws NullPointerException if some element of c is null and this
|
||||
* collection does not support retaining null values.
|
||||
* @throws NullPointerException if c itself is null.
|
||||
*/
|
||||
boolean retainAll(Collection c);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue