Replace the value of key with the slot computed by the "compute" method. If "compute" throws an exception, make no change. If "compute" returns null, remove the mapping, otherwise, replace any existing mapping with the result of "compute", and create a new mapping if none exists. This is equivalent
(
SlotMapOwner<T> owner, Object key, int index, SlotComputer<S, T> compute)
| 65 | * use of multiple Slot subclasses, this function is templatized. |
| 66 | */ |
| 67 | default <S extends Slot<T>> S compute( |
| 68 | SlotMapOwner<T> owner, Object key, int index, SlotComputer<S, T> compute) { |
| 69 | try (var mutableMap = owner.startCompoundOp(true)) { |
| 70 | return mutableMap.compute(owner, mutableMap, key, index, compute); |
no outgoing calls