public class DefaultConfiguration extends Properties implements ModifiableConfiguration
defaults
Constructor and Description |
---|
DefaultConfiguration()
Creates an empty property list with no default values.
|
Modifier and Type | Method and Description |
---|---|
Iterator |
findPropertyKeys(String prefix)
Searches all property keys that start with a given prefix.
|
Enumeration |
getConfigProperties()
Returns an enumeration of the property keys.
|
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, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
clone
public DefaultConfiguration()
public String getConfigProperty(String key)
getConfigProperty
in interface Configuration
key
- the property key.public String getConfigProperty(String key, String defaultValue)
If the property is not defined in this configuration, the code will lookup the property in the parent configuration.
getConfigProperty
in interface Configuration
key
- the property key.defaultValue
- the default value.public Iterator findPropertyKeys(String prefix)
findPropertyKeys
in interface ModifiableConfiguration
findPropertyKeys
in interface Configuration
prefix
- the prefix that all selected property keys should sharepublic Enumeration getConfigProperties()
getConfigProperties
in interface ModifiableConfiguration
getConfigProperties
in interface Configuration
public void setConfigProperty(String key, String value)
setConfigProperty
in interface ModifiableConfiguration
key
- the property key.value
- the property value.Copyright © 2001–2018 JFree.org. All rights reserved.