public class Config
extends java.lang.Object
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
static long |
getMillisecondsProperty(java.lang.String name,
long defaultValue)
Retrieve the value of a system property as an integer representing milliseconds.
|
static boolean |
getProperty(java.lang.String name,
boolean defaultValue)
Retrieve the value of a system property as a boolean value.
|
static int |
getProperty(java.lang.String name,
int defaultValue)
Retrieve the value of a system property as an integer value.
|
static long |
getProperty(java.lang.String name,
long defaultValue)
Retrieve the value of a system property as a long integer value.
|
static java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Retrieve the value of a system property as a string value.
|
public static java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
name
- the system property namedefaultValue
- the default value, returned if system property is not setpublic static boolean getProperty(java.lang.String name, boolean defaultValue)
Boolean.parseBoolean(java.lang.String)
.name
- the system property namedefaultValue
- the default value, returned if system property is not setpublic static int getProperty(java.lang.String name, int defaultValue)
name
- the system property namedefaultValue
- the default value, returned if system property is not setpublic static long getProperty(java.lang.String name, long defaultValue)
name
- the system property namedefaultValue
- the default value, returned if system property is not setpublic static long getMillisecondsProperty(java.lang.String name, long defaultValue)
name
- the system property namedefaultValue
- the default value, in milliseconds, returned if system property is not set