Modifier and Type | Field and Description |
---|---|
private static Config |
__config |
private static boolean |
__fileExists |
private static String |
__filename |
private static long |
__lastModified |
private static boolean |
_initialized |
private static Logger |
_logger |
private Map<String,String> |
_values |
Modifier | Constructor and Description |
---|---|
private |
Config() |
Modifier and Type | Method and Description |
---|---|
static void |
dispose()
Dispose this Config instance
|
static boolean |
getFileExists()
Returns true if the config filename exists.
|
static Config |
getInstance()
Get the instance of Config using the config file.
|
Boolean |
getValueAsBoolean(String id)
Return the typed value as boolean
|
Date |
getValueAsDate(String id)
Return the typed value as Date
|
Double |
getValueAsDouble(String id)
Return the typed value casted in double
|
Long |
getValueAsLong(String id)
Return the typed value as long
|
String |
getValueAsString(String id)
Return the typed value as String
|
static Map<String,String> |
read()
Read config file and get untyped values (String object)
|
static void |
setFilename(String filename)
Set the config filename
|
static void |
setInitialized(boolean initialized)
Set the initialization status of the configuration
|
private static String __filename
private static boolean __fileExists
private static boolean _initialized
private static long __lastModified
public static Config getInstance()
public static void dispose()
public static void setFilename(String filename)
filename
- Name with path of the config filepublic static void setInitialized(boolean initialized)
initialized
- the initialization status of the configurationpublic static boolean getFileExists()
public String getValueAsString(String id)
id
- Id of the parameter to getpublic Date getValueAsDate(String id)
id
- Id of the parameter to getpublic Long getValueAsLong(String id)
id
- Id of the parameter to getpublic Boolean getValueAsBoolean(String id)
id
- Id of the parameter to getpublic Double getValueAsDouble(String id)
id
- Id of the parameter to get