2707 |
|
} |
2708 |
|
|
2709 |
|
/** |
2710 |
< |
* If the specified key is not already associated with a value (or |
2711 |
< |
* is mapped to {@code null}), attempts to compute its value using |
2712 |
< |
* the given mapping function and enters it into this map unless |
2713 |
< |
* {@code null}. The entire method invocation is performed |
2714 |
< |
* atomically, so the function is applied at most once per key. |
2715 |
< |
* Some attempted update operations on this map by other threads |
2716 |
< |
* may be blocked while computation is in progress, so the |
2717 |
< |
* computation should be short and simple, and must not attempt to |
2718 |
< |
* update any other mappings of this Map. |
2710 |
> |
* If the specified key is not already associated with a value, |
2711 |
> |
* attempts to compute its value using the given mapping function |
2712 |
> |
* and enters it into this map unless {@code null}. The entire |
2713 |
> |
* method invocation is performed atomically, so the function is |
2714 |
> |
* applied at most once per key. Some attempted update operations |
2715 |
> |
* on this map by other threads may be blocked while computation |
2716 |
> |
* is in progress, so the computation should be short and simple, |
2717 |
> |
* and must not attempt to update any other mappings of this map. |
2718 |
|
* |
2719 |
|
* @param key key with which the specified value is to be associated |
2720 |
|
* @param mappingFunction the function to compute a value |
2733 |
|
} |
2734 |
|
|
2735 |
|
/** |
2736 |
< |
* If the value for the specified key is present and non-null, |
2737 |
< |
* attempts to compute a new mapping given the key and its current |
2738 |
< |
* mapped value. The entire method invocation is performed |
2739 |
< |
* atomically. Some attempted update operations on this map by |
2740 |
< |
* other threads may be blocked while computation is in progress, |
2741 |
< |
* so the computation should be short and simple, and must not |
2742 |
< |
* attempt to update any other mappings of this Map. |
2736 |
> |
* If the value for the specified key is present, attempts to |
2737 |
> |
* compute a new mapping given the key and its current mapped |
2738 |
> |
* value. The entire method invocation is performed atomically. |
2739 |
> |
* Some attempted update operations on this map by other threads |
2740 |
> |
* may be blocked while computation is in progress, so the |
2741 |
> |
* computation should be short and simple, and must not attempt to |
2742 |
> |
* update any other mappings of this map. |
2743 |
|
* |
2744 |
|
* @param key key with which a value may be associated |
2745 |
|
* @param remappingFunction the function to compute a value |