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