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, stringPropertyNamesclear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, valuesclonepublic DefaultConfiguration()
public String getConfigProperty(String key)
getConfigProperty in interface Configurationkey - the property key.public String getConfigProperty(String key, String defaultValue)
getConfigProperty in interface Configurationkey - the property key.defaultValue - the default value.public Iterator<String> findPropertyKeys(String prefix)
findPropertyKeys in interface Configurationprefix - the prefix that all selected property keys should sharepublic Enumeration<String> getConfigProperties()
ConfigurationgetConfigProperties in interface Configurationpublic void setConfigProperty(String key, String value)
setConfigProperty in interface ModifiableConfigurationkey - the property key.value - the property value.