diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-01 11:14:42 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-01 11:14:42 +0000 |
commit | 4fddb45ad89bef0e72f4cc6083f09a6f8af19733 (patch) | |
tree | 3ae8e78c344eaaa79a9b787c8b0546d1c8fdb2c0 /libjava/java/util/Set.java | |
parent | 59c0021c455e6b40df6b6472728933ddf971fc6e (diff) | |
download | ppe42-gcc-4fddb45ad89bef0e72f4cc6083f09a6f8af19733.tar.gz ppe42-gcc-4fddb45ad89bef0e72f4cc6083f09a6f8af19733.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/Set.java')
-rw-r--r-- | libjava/java/util/Set.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libjava/java/util/Set.java b/libjava/java/util/Set.java index 8a3290f1e40..eb4df3ef299 100644 --- a/libjava/java/util/Set.java +++ b/libjava/java/util/Set.java @@ -118,6 +118,10 @@ public interface Set extends Collection * * @param o the object to look for * @return true if it is found in the set + * @throws ClassCastException if the type of o is not a valid type + * for this set. + * @throws NullPointerException if o is null and this set doesn't + * support null values. */ boolean contains(Object o); @@ -129,6 +133,10 @@ public interface Set extends Collection * @param c the collection to check membership in * @return true if all elements in this set are in c * @throws NullPointerException if c is null + * @throws ClassCastException if the type of any element in c is not + * a valid type for this set. + * @throws NullPointerException if some element of c is null and this + * set doesn't support null values. * @see #contains(Object) */ boolean containsAll(Collection c); @@ -148,6 +156,7 @@ public interface Set extends Collection * equals, this is the sum of the hashcode of all elements in the set. * * @return the sum of the hashcodes of all set elements + * @see #equals(Object) */ int hashCode(); @@ -174,6 +183,10 @@ public interface Set extends Collection * @param o the object to remove * @return true if the set changed (an object was removed) * @throws UnsupportedOperationException if this operation is not allowed + * @throws ClassCastException if the type of o is not a valid type + * for this set. + * @throws NullPointerException if o is null and this set doesn't allow + * the removal of a null value. */ boolean remove(Object o); @@ -186,6 +199,10 @@ public interface Set extends Collection * @return true if this set changed as a result * @throws UnsupportedOperationException if this operation is not allowed * @throws NullPointerException if c is null + * @throws ClassCastException if the type of any element in c is not + * a valid type for this set. + * @throws NullPointerException if some element of c is null and this + * set doesn't support removing null values. * @see #remove(Object) */ boolean removeAll(Collection c); @@ -199,6 +216,10 @@ public interface Set extends Collection * @return true if this set was modified * @throws UnsupportedOperationException if this operation is not allowed * @throws NullPointerException if c is null + * @throws ClassCastException if the type of any element in c is not + * a valid type for this set. + * @throws NullPointerException if some element of c is null and this + * set doesn't support retaining null values. * @see #remove(Object) */ boolean retainAll(Collection c); |