9 |
|
|
10 |
|
/** |
11 |
|
* A {@link java.util.Map} providing an additional atomic |
12 |
< |
* <tt>putIfAbsent</tt> method. |
12 |
> |
* <tt>putIfAbsent</tt> and <tt>remove</tt> methods. |
13 |
|
* @since 1.5 |
14 |
|
* @author Doug Lea |
15 |
|
*/ |
45 |
|
* |
46 |
|
**/ |
47 |
|
V putIfAbsent(K key, V value); |
48 |
+ |
|
49 |
+ |
/** |
50 |
+ |
* Remove entry for key only if currently mapped to given value. |
51 |
+ |
* Acts as |
52 |
+ |
* <pre> |
53 |
+ |
* if (map.get(key) == value) map.remove(key); |
54 |
+ |
* </pre> |
55 |
+ |
* except that the action is performed atomically. |
56 |
+ |
*/ |
57 |
+ |
boolean remove(K key, V value); |
58 |
+ |
|
59 |
|
} |