-
public class SystemProperties
-
-
Method Summary
Modifier and Type Method Description static Stringget(String key)Get the value for the given key. static Stringget(String key, String def)Get the value for the given key. static booleangetBoolean(String key, boolean def)Get the value for the given key, returned as a boolean. static intgetInt(String key, int def)Get the value for the given key, and return as an integer. static longgetLong(String key, long def)Get the value for the given key, and return as a long. -
-
Method Detail
-
getBoolean
static boolean getBoolean(String key, boolean def)
Get the value for the given key, returned as a boolean. Values 'n', 'no', '0', 'false' or'off' are considered false. Values 'y', 'yes', '1', 'true' or 'on' are considered true. (casesensitive). If the key does not exist, or has any other value, then the default result isreturned.
- Parameters:
key- the key to lookupdef- a default value to return
-
getInt
static int getInt(String key, int def)
Get the value for the given key, and return as an integer.
- Parameters:
key- the key to lookupdef- a default value to return
-
-
-
-