From b828123e23c9a8fb42b98a54b34141fe4dace764 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Sun, 1 Aug 2004 11:14:42 +0000 Subject: Collection.java, [...]: Added additional exceptions to documentation. 2004-08-01 Andrew John Hughes * 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 --- libjava/java/util/Map.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'libjava/java/util/Map.java') diff --git a/libjava/java/util/Map.java b/libjava/java/util/Map.java index f7643f92a5e..75658da5698 100644 --- a/libjava/java/util/Map.java +++ b/libjava/java/util/Map.java @@ -106,6 +106,10 @@ public interface Map * * @param value the value to search for * @return true if the map contains the value + * @throws ClassCastException if the type of the value is not a valid type + * for this map. + * @throws NullPointerException if the value is null and the map doesn't + * support null values. */ boolean containsValue(Object value); @@ -164,7 +168,8 @@ public interface Map * @throws ClassCastException if the key or value is of the wrong type * @throws IllegalArgumentException if something about this key or value * prevents it from existing in this map - * @throws NullPointerException if the map forbids null keys or values + * @throws NullPointerException if either the key or the value is null, + * and the map forbids null keys or values * @see #containsKey(Object) */ Object put(Object key, Object value); @@ -224,8 +229,12 @@ public interface Map * @param key the key to remove * @return the value the key mapped to, or null if not present * @throws UnsupportedOperationException if deletion is unsupported + * @throws NullPointerException if the key is null and this map doesn't + * support null keys. + * @throws ClassCastException if the type of the key is not a valid type + * for this map. */ - Object remove(Object o); + Object remove(Object key); /** * Returns the number of key-value mappings in the map. If there are more -- cgit v1.2.3