9 |
|
|
10 |
|
/** |
11 |
|
* A {@link java.util.Map} providing additional atomic |
12 |
< |
* <tt>putIfAbsent</tt>, <tt>remove</tt>, and <tt>replace</tt> methods. |
12 |
> |
* {@code putIfAbsent}, {@code remove}, and {@code replace} methods. |
13 |
|
* |
14 |
|
* <p>Memory consistency effects: As with other concurrent |
15 |
|
* collections, actions in a thread prior to placing an object into a |
43 |
|
* @param key key with which the specified value is to be associated |
44 |
|
* @param value value to be associated with the specified key |
45 |
|
* @return the previous value associated with the specified key, or |
46 |
< |
* <tt>null</tt> if there was no mapping for the key. |
47 |
< |
* (A <tt>null</tt> return can also indicate that the map |
48 |
< |
* previously associated <tt>null</tt> with the key, |
46 |
> |
* {@code null} if there was no mapping for the key. |
47 |
> |
* (A {@code null} return can also indicate that the map |
48 |
> |
* previously associated {@code null} with the key, |
49 |
|
* if the implementation supports null values.) |
50 |
< |
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
50 |
> |
* @throws UnsupportedOperationException if the {@code put} operation |
51 |
|
* is not supported by this map |
52 |
|
* @throws ClassCastException if the class of the specified key or value |
53 |
|
* prevents it from being stored in this map |
72 |
|
* |
73 |
|
* @param key key with which the specified value is associated |
74 |
|
* @param value value expected to be associated with the specified key |
75 |
< |
* @return <tt>true</tt> if the value was removed |
76 |
< |
* @throws UnsupportedOperationException if the <tt>remove</tt> operation |
75 |
> |
* @return {@code true} if the value was removed |
76 |
> |
* @throws UnsupportedOperationException if the {@code remove} operation |
77 |
|
* is not supported by this map |
78 |
|
* @throws ClassCastException if the key or value is of an inappropriate |
79 |
|
* type for this map |
99 |
|
* @param key key with which the specified value is associated |
100 |
|
* @param oldValue value expected to be associated with the specified key |
101 |
|
* @param newValue value to be associated with the specified key |
102 |
< |
* @return <tt>true</tt> if the value was replaced |
103 |
< |
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
102 |
> |
* @return {@code true} if the value was replaced |
103 |
> |
* @throws UnsupportedOperationException if the {@code put} operation |
104 |
|
* is not supported by this map |
105 |
|
* @throws ClassCastException if the class of a specified key or value |
106 |
|
* prevents it from being stored in this map |
125 |
|
* @param key key with which the specified value is associated |
126 |
|
* @param value value to be associated with the specified key |
127 |
|
* @return the previous value associated with the specified key, or |
128 |
< |
* <tt>null</tt> if there was no mapping for the key. |
129 |
< |
* (A <tt>null</tt> return can also indicate that the map |
130 |
< |
* previously associated <tt>null</tt> with the key, |
128 |
> |
* {@code null} if there was no mapping for the key. |
129 |
> |
* (A {@code null} return can also indicate that the map |
130 |
> |
* previously associated {@code null} with the key, |
131 |
|
* if the implementation supports null values.) |
132 |
< |
* @throws UnsupportedOperationException if the <tt>put</tt> operation |
132 |
> |
* @throws UnsupportedOperationException if the {@code put} operation |
133 |
|
* is not supported by this map |
134 |
|
* @throws ClassCastException if the class of the specified key or value |
135 |
|
* prevents it from being stored in this map |