public final class Settings extends Object
| Modifier and Type | Method and Description |
|---|---|
static Boolean |
getBooleanSetting(Map<String,Object> settings,
String key)
Returns a boolean value for the key, defaults to false if not specified.
|
static Boolean |
getBooleanSetting(Map<String,Object> settings,
String key,
Boolean defaultVal)
Gets a Boolean value for the key, returning the default value given if
not specified or not a valid boolean value.
|
static Integer |
getIntegerSetting(Map<String,Object> settings,
String key,
Integer defaultVal)
Gets an Integer value for the key, returning the default value given if
not specified or not a valid numeric value.
|
protected static int |
getIntSetting(Map<String,Object> settings,
String key,
int defaultVal)
Gets an int value for the setting, returning the default value if not
specified.
|
static String |
getStringSetting(Map<String,Object> settings,
String key,
String defaultVal)
Gets a String value for the setting, returning the default value if not
specified.
|
public static Boolean getBooleanSetting(Map<String,Object> settings, String key)
getBooleanSetting(java.util.Map, String, Boolean).settings - key - the key value to get the boolean setting forpublic static Boolean getBooleanSetting(Map<String,Object> settings, String key, Boolean defaultVal)
settings - key - the key to get the boolean setting fordefaultVal - the default value to return if the setting was not specified
or was not coercible to a Boolean valuepublic static Integer getIntegerSetting(Map<String,Object> settings, String key, Integer defaultVal)
settings - key - the key to get the Integer setting fordefaultVal - the default value to return if the setting was not specified
or was not coercible to an Integer valuepublic static String getStringSetting(Map<String,Object> settings, String key, String defaultVal)
settings - key - the key to get the String setting fordefaultVal - the default value to return if the setting was not specifiedprotected static int getIntSetting(Map<String,Object> settings, String key, int defaultVal) throws IllegalArgumentException
settings - key - the key to get the int value fordefaultVal - default value if the setting was not specifiedIllegalArgumentException - if setting does not contain an intCopyright © 2010-2016 JmxTrans team. All Rights Reserved.