MotechMapUtils¶
-
public final class
MotechMapUtils
¶ The
MotechMapUtils
class contains methods that allow modifications and operations on maps
Methods¶
asProperties¶
-
public static Properties
asProperties
(Map<Object, Object> map)¶ Converts java.util.Map into java.util.Properties
Parameters: - map – Map to convert
Returns: Properties, created from given map
mergeMaps¶
-
public static Map<Object, Object>
mergeMaps
(Map<Object, Object> overridingMap, Map<Object, Object> baseMap)¶ Null-safe merge of two maps. If both parameters are null it returns empty map. If one of the maps is null, it returns the other one. If a key is present in two maps, the value in the merged map will be taken from the overriding map.
Parameters: - overridingMap – The map overriding values in the base map
- baseMap – The base map
Returns: merged map