29 |
|
* if (!map.containsKey(key)) |
30 |
|
* return map.put(key, value); |
31 |
|
* else |
32 |
< |
* return map.get(key); |
33 |
< |
* </pre> |
32 |
> |
* return map.get(key);</pre> |
33 |
|
* except that the action is performed atomically. |
34 |
|
* |
35 |
|
* @param key key with which the specified value is to be associated. |
58 |
|
* if (map.containsKey(key) && map.get(key).equals(value)) { |
59 |
|
* map.remove(key); |
60 |
|
* return true; |
61 |
< |
* } else return false; |
63 |
< |
* </pre> |
61 |
> |
* } else return false;</pre> |
62 |
|
* except that the action is performed atomically. |
63 |
|
* |
64 |
|
* @param key key with which the specified value is associated. |
78 |
|
* if (map.containsKey(key) && map.get(key).equals(oldValue)) { |
79 |
|
* map.put(key, newValue); |
80 |
|
* return true; |
81 |
< |
* } else return false; |
84 |
< |
* </pre> |
81 |
> |
* } else return false;</pre> |
82 |
|
* except that the action is performed atomically. |
83 |
|
* |
84 |
|
* @param key key with which the specified value is associated. |
98 |
|
* <pre> |
99 |
|
* if (map.containsKey(key)) { |
100 |
|
* return map.put(key, value); |
101 |
< |
* } else return null; |
105 |
< |
* </pre> |
101 |
> |
* } else return null;</pre> |
102 |
|
* except that the action is performed atomically. |
103 |
|
* |
104 |
|
* @param key key with which the specified value is associated. |