diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2004-08-01 11:14:42 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-08-01 11:14:42 +0000 |
commit | b828123e23c9a8fb42b98a54b34141fe4dace764 (patch) | |
tree | 3ae8e78c344eaaa79a9b787c8b0546d1c8fdb2c0 /libjava/java/util/Collection.java | |
parent | 5b5662eea779eb744d214bd46fc4e4fed67b8d33 (diff) | |
download | gcc-b828123e23c9a8fb42b98a54b34141fe4dace764.zip gcc-b828123e23c9a8fb42b98a54b34141fe4dace764.tar.gz gcc-b828123e23c9a8fb42b98a54b34141fe4dace764.tar.bz2 |
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
Diffstat (limited to 'libjava/java/util/Collection.java')
-rw-r--r-- | libjava/java/util/Collection.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libjava/java/util/Collection.java b/libjava/java/util/Collection.java index 977c603..6ec9c4e 100644 --- a/libjava/java/util/Collection.java +++ b/libjava/java/util/Collection.java @@ -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); |