public enum Configuration extends Enum<Configuration>
The Global Konik Configuration.
Try to load Konik Configuration from file
io.konik.configuration.properties
. System properties provided with the
-Dio.konik* or `System.setProperties("io.konik*")
will override the
file content.
Enum Constant and Description |
---|
INSTANCE
The singleton configuration instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getProperty(String key)
Searches for the property with the specified key in this property list.
|
String |
getProperty(String key,
String defaultValue)
Searches for the property with the specified key in this property list.
|
String |
toString() |
static Configuration |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Configuration[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Configuration INSTANCE
The singleton configuration instance.
public String getProperty(String key)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns <code>null</code> if the property is not found.
key
- the property key.getProperty(String, String)
public String getProperty(String key, String defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.
key
- the hashtable key.defaultValue
- a default value.getProperty(String)
public String toString()
toString
in class Enum<Configuration>
public static Configuration valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Configuration[] values()
for (Configuration c : Configuration.values()) System.out.println(c);
Copyright © 2014-2017 Konik.io. All Rights Reserved.