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
LiteralMapinvalid input: '<'>().set("a", a).set("b",b)`.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
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, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
BuilderMap
public BuilderMap()
-
-
Method Details
-
set
-
setAll
-
setIfAbsent
-
map
-