K
- class of the keyV
- class of the valuepublic static class Utils.InstrumentedMap<K,V>
extends java.util.HashMap<K,V>
Modifier and Type | Field and Description |
---|---|
private java.util.function.Supplier<V> |
valueSupplier
the value supplier
|
Constructor and Description |
---|
InstrumentedMap(java.util.function.Supplier<V> valueSupplier)
Constructor
|
Modifier and Type | Method and Description |
---|---|
V |
modifyValue(K key,
java.util.function.Consumer<V> modifier)
Modify the value of a map creating it if absent
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values