public class DefaultConfiguration extends Properties implements ModifiableConfiguration
Constructor and Description |
---|
DefaultConfiguration()
Creates an empty property list with no default values.
|
Modifier and Type | Method and Description |
---|---|
Iterator<String> |
findPropertyKeys(String prefix)
Searches all property keys that start with a given prefix.
|
Enumeration<String> |
getConfigProperties()
Returns the configuration properties.
|
String |
getConfigProperty(String key)
Returns the configuration property with the specified key.
|
String |
getConfigProperty(String key,
String defaultValue)
Returns the configuration property with the specified key (or the
specified default value if there is no such property).
|
void |
setConfigProperty(String key,
String value)
Sets the value of a configuration property.
|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values
clone
public DefaultConfiguration()
public String getConfigProperty(String key)
getConfigProperty
in interface Configuration
key
- the property key.public String getConfigProperty(String key, String defaultValue)
getConfigProperty
in interface Configuration
key
- the property key.defaultValue
- the default value.public Iterator<String> findPropertyKeys(String prefix)
findPropertyKeys
in interface Configuration
prefix
- the prefix that all selected property keys should sharepublic Enumeration<String> getConfigProperties()
Configuration
getConfigProperties
in interface Configuration
public void setConfigProperty(String key, String value)
setConfigProperty
in interface ModifiableConfiguration
key
- the property key.value
- the property value.