34 |
|
* |
35 |
|
* @param key key with which the specified value is to be associated |
36 |
|
* @param value value to be associated with the specified key |
37 |
< |
* @return the previous value associated with <tt>key</tt>, or |
38 |
< |
* <tt>null</tt> if there was no mapping for <tt>key</tt>. |
37 |
> |
* @return the previous value associated with the specified key, or |
38 |
> |
* <tt>null</tt> if there was no mapping for the key. |
39 |
|
* (A <tt>null</tt> return can also indicate that the map |
40 |
< |
* previously associated <tt>null</tt> with <tt>key</tt>, |
41 |
< |
* if the implementation supports <tt>null</tt> values.) |
40 |
> |
* previously associated <tt>null</tt> with the key, |
41 |
> |
* if the implementation supports null values.) |
42 |
|
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
43 |
|
* is not supported by this map |
44 |
|
* @throws ClassCastException if the class of the specified key or value |
62 |
|
* except that the action is performed atomically. |
63 |
|
* |
64 |
|
* @param key key with which the specified value is associated |
65 |
< |
* @param value value associated with the specified key |
66 |
< |
* @return true if the value was removed, false otherwise |
65 |
> |
* @param value value expected to be associated with the specified key |
66 |
> |
* @return <tt>true</tt> if the value was removed |
67 |
|
* @throws UnsupportedOperationException if the <tt>remove</tt> operation |
68 |
|
* is not supported by this map |
69 |
+ |
* @throws ClassCastException if the key or value is of an inappropriate |
70 |
+ |
* type for this map (optional) |
71 |
|
* @throws NullPointerException if the specified key or value is null, |
72 |
< |
* and this map does not permit null keys or values |
72 |
> |
* and this map does not permit null keys or values (optional) |
73 |
|
*/ |
74 |
|
boolean remove(Object key, Object value); |
75 |
|
|
86 |
|
* @param key key with which the specified value is associated |
87 |
|
* @param oldValue value expected to be associated with the specified key |
88 |
|
* @param newValue value to be associated with the specified key |
89 |
< |
* @return true if the value was replaced |
89 |
> |
* @return <tt>true</tt> if the value was replaced |
90 |
|
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
91 |
|
* is not supported by this map |
92 |
+ |
* @throws ClassCastException if the class of a specified key or value |
93 |
+ |
* prevents it from being stored in this map |
94 |
|
* @throws NullPointerException if a specified key or value is null, |
95 |
|
* and this map does not permit null keys or values |
96 |
+ |
* @throws IllegalArgumentException if some property of a specified key |
97 |
+ |
* or value prevents it from being stored in this map |
98 |
|
*/ |
99 |
|
boolean replace(K key, V oldValue, V newValue); |
100 |
|
|
109 |
|
* |
110 |
|
* @param key key with which the specified value is associated |
111 |
|
* @param value value to be associated with the specified key |
112 |
< |
* @return the previous value associated with <tt>key</tt>, or |
113 |
< |
* <tt>null</tt> if there was no mapping for <tt>key</tt>. |
112 |
> |
* @return the previous value associated with the specified key, or |
113 |
> |
* <tt>null</tt> if there was no mapping for the key. |
114 |
|
* (A <tt>null</tt> return can also indicate that the map |
115 |
< |
* previously associated <tt>null</tt> with <tt>key</tt>, |
116 |
< |
* if the implementation supports <tt>null</tt> values.) |
115 |
> |
* previously associated <tt>null</tt> with the key, |
116 |
> |
* if the implementation supports null values.) |
117 |
|
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
118 |
|
* is not supported by this map |
119 |
+ |
* @throws ClassCastException if the class of the specified key or value |
120 |
+ |
* prevents it from being stored in this map |
121 |
|
* @throws NullPointerException if the specified key or value is null, |
122 |
|
* and this map does not permit null keys or values |
123 |
+ |
* @throws IllegalArgumentException if some property of the specified key |
124 |
+ |
* or value prevents it from being stored in this map |
125 |
|
*/ |
126 |
|
V replace(K key, V value); |
117 |
– |
|
127 |
|
} |