Package aQute.libg.map
Class BuilderMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
aQute.libg.map.BuilderMap<K,V>
- Type Parameters:
K
- the key typeV
- the value type
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
V>
A map that is to set inline like a builder. I.e. you can do `new
LiteralMap<>().set("a", a).set("b",b)`.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> BuilderMap<K, V> map
(K key, V value) BuilderMap<K,
V> BuilderMap<K,
V> BuilderMap<K,
V> setIfAbsent
(K key, V value) Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
BuilderMap
public BuilderMap()
-
-
Method Details
-
set
-
setAll
-
setIfAbsent
-
map
-