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
This commit is contained in:
parent
5b5662eea7
commit
b828123e23
7 changed files with 111 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue