ch.hsr.bieridee.utils
Class ConfigManager
java.lang.Object
ch.hsr.bieridee.utils.ConfigManager
public final class ConfigManager
- extends java.lang.Object
ConfigManger providing settings listed in the conf.properties file.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getStringProperty
public java.lang.String getStringProperty(java.lang.String property,
java.lang.String defProperty)
- Parameters:
property
- Propertyname in the conf/conf.properties file.defProperty
- default Property Value.
- Returns:
- String containing the Property value.
getIntProperty
public int getIntProperty(java.lang.String property,
int defProperty)
- Parameters:
property
- String describing the valuedefProperty
- Fallback default value
- Returns:
- integer value
setProperty
public void setProperty(java.lang.String key,
java.lang.String value)
- Parameters:
key
- Identifier for the Config Valuevalue
- Value to save
setProperty
public void setProperty(java.lang.String key,
int value)
- Parameters:
key
- Identifier for the Config Valuevalue
- Value to save
saveConfig
public void saveConfig()
- Saves to whole config to file.
getManager
public static ConfigManager getManager()
- Returns:
- the ConfigManager Singleton