2035 |
|
* if (!map.containsKey(key)) |
2036 |
|
* return map.put(key, value); |
2037 |
|
* else |
2038 |
< |
* return map.get(key); |
2039 |
< |
* </pre> |
2038 |
> |
* return map.get(key);</pre> |
2039 |
|
* except that the action is performed atomically. |
2040 |
|
* @param key key with which the specified value is to be associated. |
2041 |
|
* @param value value to be associated with the specified key. |
2059 |
|
* if (map.containsKey(key) && map.get(key).equals(value)) { |
2060 |
|
* map.remove(key); |
2061 |
|
* return true; |
2062 |
< |
* } else return false; |
2064 |
< |
* </pre> |
2062 |
> |
* } else return false;</pre> |
2063 |
|
* except that the action is performed atomically. |
2064 |
|
* @param key key with which the specified value is associated. |
2065 |
|
* @param value value associated with the specified key. |
2081 |
|
* if (map.containsKey(key) && map.get(key).equals(oldValue)) { |
2082 |
|
* map.put(key, newValue); |
2083 |
|
* return true; |
2084 |
< |
* } else return false; |
2087 |
< |
* </pre> |
2084 |
> |
* } else return false;</pre> |
2085 |
|
* except that the action is performed atomically. |
2086 |
|
* @param key key with which the specified value is associated. |
2087 |
|
* @param oldValue value expected to be associated with the specified key. |
2116 |
|
* <pre> |
2117 |
|
* if (map.containsKey(key)) { |
2118 |
|
* return map.put(key, value); |
2119 |
< |
* } else return null; |
2123 |
< |
* </pre> |
2119 |
> |
* } else return null;</pre> |
2120 |
|
* except that the action is performed atomically. |
2121 |
|
* @param key key with which the specified value is associated. |
2122 |
|
* @param value value to be associated with the specified key. |