Package org.hisp.dhis.util
Class MapBuilder<K,V>
java.lang.Object
org.hisp.dhis.util.MapBuilder<K,V>
Builder of maps.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the map.MapBuilder<K,V> Associates the specified value with the specified key in this map.MapBuilder<K,V> putIfAbsent(K key, V value) If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.
-
Constructor Details
-
MapBuilder
public MapBuilder()
-
-
Method Details
-
put
Associates the specified value with the specified key in this map.- Parameters:
key- the key.value- the value.- Returns:
- this
MapBuilder.
-
putIfAbsent
If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.- Parameters:
key- the key.value- the value.- Returns:
- this
MapBuilder.
-
build
Builds the map.- Returns:
- the
Map.
-