public class Maps extends Object
Constructor and Description |
---|
Maps() |
Modifier and Type | Method and Description |
---|---|
static boolean |
booleanValue(Map<String,?> map,
String key)
Returns the boolean value of the given property in the map or false
|
static boolean |
booleanValue(Map<String,?> map,
String key,
boolean defaultValue)
Returns the boolean value of the given property in the map or returns the default value if its not present
|
static Integer |
integerValue(Map<String,?> map,
String key)
Returns the Integer value of the given property in the map or null
|
static Integer |
integerValue(Map<String,?> map,
String key,
Integer defaultValue)
Returns the Integer value of the given property in the map or returns the default value if its not present
|
static boolean |
isNullOrEmpty(Map map) |
static List |
listValue(Map<String,Object> map,
String key)
Returns a list of values for the given key.
|
static Long |
longValue(Map<String,?> map,
String key)
Returns the Long value of the given property in the map or null
|
static Long |
longValue(Map<String,?> map,
String key,
Long defaultValue)
Returns the Integer value of the given property in the map or returns the default value if its not present
|
static String |
nestedValueAsString(Map<String,Object> map,
String... names) |
static LinkedHashMap<String,String> |
parseMap(String text)
Parses text from an environment variable of the form "key=value,key2=value2" into a Map
|
static <K,V> void |
putAll(Map<K,V> output,
Map<K,V> input,
K... keys)
Copies the entries for the given keys form the input map to the output map
|
static void |
setStringValues(Map map,
String key,
String[] values)
Sets the string values in the map for the given key, using a comma to separate the values as a String
|
static void |
setValue(Map map,
String key,
Object value)
Sets the value in the map for the given key; if the value is null then remove the value from the map
|
static String |
stringValue(Map map,
String key)
Returns the String value of the given property in the map or null
|
static String |
stringValue(Map map,
String key,
String defaultValue)
Returns the String value of the given property in the map if its defined or the default value
|
static String[] |
stringValues(Map map,
String key)
Returns the string values for the given key.
|
static Object |
value(Map<String,Object> map,
String key,
Object defaultValue)
Returns the value of the given property in the map
|
static String |
valueAsString(Map<String,Object> map,
String key) |
protected static Object |
valueOrNull(Map<String,Object> map,
String key) |
public static boolean isNullOrEmpty(Map map)
public static <K,V> void putAll(Map<K,V> output, Map<K,V> input, K... keys)
public static boolean booleanValue(Map<String,?> map, String key)
public static boolean booleanValue(Map<String,?> map, String key, boolean defaultValue)
public static Integer integerValue(Map<String,?> map, String key)
public static Integer integerValue(Map<String,?> map, String key, Integer defaultValue)
public static Long longValue(Map<String,?> map, String key)
public static Long longValue(Map<String,?> map, String key, Long defaultValue)
public static Object value(Map<String,Object> map, String key, Object defaultValue)
public static String stringValue(Map map, String key)
public static String stringValue(Map map, String key, String defaultValue)
public static void setValue(Map map, String key, Object value)
public static String[] stringValues(Map map, String key)
public static void setStringValues(Map map, String key, String[] values)
public static List listValue(Map<String,Object> map, String key)
public static String nestedValueAsString(Map<String,Object> map, String... names)
public static LinkedHashMap<String,String> parseMap(String text)
Copyright © 2011–2016 Red Hat. All rights reserved.