2057 |
|
* Remove entry for key only if currently mapped to given value. |
2058 |
|
* Acts as |
2059 |
|
* <pre> |
2060 |
< |
* if ((map.containsKey(key) && map.get(key).equals(value)) { |
2060 |
> |
* if (map.containsKey(key) && map.get(key).equals(value)) { |
2061 |
|
* map.remove(key); |
2062 |
|
* return true; |
2063 |
|
* } else return false; |
2080 |
|
* Replace entry for key only if currently mapped to given value. |
2081 |
|
* Acts as |
2082 |
|
* <pre> |
2083 |
< |
* if ((map.containsKey(key) && map.get(key).equals(oldValue)) { |
2083 |
> |
* if (map.containsKey(key) && map.get(key).equals(oldValue)) { |
2084 |
|
* map.put(key, newValue); |
2085 |
|
* return true; |
2086 |
|
* } else return false; |
2117 |
|
* Replace entry for key only if currently mapped to some value. |
2118 |
|
* Acts as |
2119 |
|
* <pre> |
2120 |
< |
* if ((map.containsKey(key)) { |
2120 |
> |
* if (map.containsKey(key)) { |
2121 |
|
* return map.put(key, value); |
2122 |
|
* } else return null; |
2123 |
|
* </pre> |