Class DefaultValueHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
ch.tocco.nice2.toolbox.api.collection.DefaultValueHashMap<K,V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
A hash map that will populate itself with a value obtained
from the given supplier.
This is intended when the value type is a container kind of
value which is populated in a loop. The first access to this
map will create the container and associate it with the given
key.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString