# | Line 19 | Line 19 | public interface ConcurrentMap<K, V> ext | |
---|---|---|
19 | * with a value, associate it with the given value. | |
20 | * This is equivalent to | |
21 | * <pre> | |
22 | < | * if (!map.containsKey(key)) map.put(key, value); |
23 | < | * return get(key); |
22 | > | * if (!map.containsKey(key)) |
23 | > | * return map.put(key, value); |
24 | > | * else |
25 | > | * return map.get(key); |
26 | * </pre> | |
27 | * Except that the action is performed atomically. | |
28 | * @param key key with which the specified value is to be associated. |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |