aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/Map.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/Map.java')
-rw-r--r--libjava/java/util/Map.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/libjava/java/util/Map.java b/libjava/java/util/Map.java
index f7643f9..75658da 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