aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/Set.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2004-08-01 11:14:42 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-08-01 11:14:42 +0000
commitb828123e23c9a8fb42b98a54b34141fe4dace764 (patch)
tree3ae8e78c344eaaa79a9b787c8b0546d1c8fdb2c0 /libjava/java/util/Set.java
parent5b5662eea779eb744d214bd46fc4e4fed67b8d33 (diff)
downloadgcc-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/Set.java')
-rw-r--r--libjava/java/util/Set.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/libjava/java/util/Set.java b/libjava/java/util/Set.java
index 8a3290f..eb4df3e 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);