Package org.jfree.util
Class DefaultConfiguration
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,,Object> ModifiableConfiguration,Configuration
Default configuration.
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty property list with no default values. -
Method Summary
Modifier and TypeMethodDescriptionfindPropertyKeys(String prefix) Searches all property keys that start with a given prefix.Returns an enumeration of the property keys.getConfigProperty(String key) Returns the configuration property with the specified key.getConfigProperty(String key, String defaultValue) Returns the configuration property with the specified key (or the specified default value if there is no such property).voidsetConfigProperty(String key, String value) Sets the value of a configuration property.Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesMethods inherited from class java.util.Hashtable
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, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jfree.util.Configuration
clone
-
Constructor Details
-
DefaultConfiguration
public DefaultConfiguration()Creates an empty property list with no default values.
-
-
Method Details
-
getConfigProperty
Returns the configuration property with the specified key.- Specified by:
getConfigPropertyin interfaceConfiguration- Parameters:
key- the property key.- Returns:
- the property value.
-
getConfigProperty
Returns the configuration property with the specified key (or the specified default value if there is no such property).If the property is not defined in this configuration, the code will lookup the property in the parent configuration.
- Specified by:
getConfigPropertyin interfaceConfiguration- Parameters:
key- the property key.defaultValue- the default value.- Returns:
- the property value.
-
findPropertyKeys
Searches all property keys that start with a given prefix.- Specified by:
findPropertyKeysin interfaceConfiguration- Specified by:
findPropertyKeysin interfaceModifiableConfiguration- Parameters:
prefix- the prefix that all selected property keys should share- Returns:
- the properties as iterator.
-
getConfigProperties
Returns an enumeration of the property keys.- Specified by:
getConfigPropertiesin interfaceConfiguration- Specified by:
getConfigPropertiesin interfaceModifiableConfiguration- Returns:
- An enumeration of the property keys.
-
setConfigProperty
Sets the value of a configuration property.- Specified by:
setConfigPropertyin interfaceModifiableConfiguration- Parameters:
key- the property key.value- the property value.
-