886 |
|
* if (!map.containsKey(key)) |
887 |
|
* return map.put(key, value); |
888 |
|
* else |
889 |
< |
* return map.get(key); |
890 |
< |
* </pre> |
889 |
> |
* return map.get(key);</pre> |
890 |
|
* except that the action is performed atomically. |
891 |
|
* @param key key with which the specified value is to be associated. |
892 |
|
* @param value value to be associated with the specified key. |
940 |
|
* if (map.get(key).equals(value)) { |
941 |
|
* map.remove(key); |
942 |
|
* return true; |
943 |
< |
* } else return false; |
945 |
< |
* </pre> |
943 |
> |
* } else return false;</pre> |
944 |
|
* except that the action is performed atomically. |
945 |
|
* @param key key with which the specified value is associated. |
946 |
|
* @param value value associated with the specified key. |
961 |
|
* if (map.get(key).equals(oldValue)) { |
962 |
|
* map.put(key, newValue); |
963 |
|
* return true; |
964 |
< |
* } else return false; |
967 |
< |
* </pre> |
964 |
> |
* } else return false;</pre> |
965 |
|
* except that the action is performed atomically. |
966 |
|
* @param key key with which the specified value is associated. |
967 |
|
* @param oldValue value expected to be associated with the specified key. |
983 |
|
* <pre> |
984 |
|
* if (map.containsKey(key)) { |
985 |
|
* return map.put(key, value); |
986 |
< |
* } else return null; |
990 |
< |
* </pre> |
986 |
> |
* } else return null;</pre> |
987 |
|
* except that the action is performed atomically. |
988 |
|
* @param key key with which the specified value is associated. |
989 |
|
* @param value value to be associated with the specified key. |