org.jfree.util

Class DefaultConfiguration

public class DefaultConfiguration extends Properties implements ModifiableConfiguration

Default configuration.

Author: Thomas Morgner.

Constructor Summary
DefaultConfiguration()
Creates an empty property list with no default values.
Method Summary
IteratorfindPropertyKeys(String prefix)
Searches all property keys that start with a given prefix.
EnumerationgetConfigProperties()
StringgetConfigProperty(String key)
Returns the configuration property with the specified key.
StringgetConfigProperty(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.

Constructor Detail

DefaultConfiguration

public DefaultConfiguration()
Creates an empty property list with no default values.

Method Detail

findPropertyKeys

public Iterator findPropertyKeys(String prefix)
Searches all property keys that start with a given prefix.

Parameters: prefix the prefix that all selected property keys should share

Returns: the properties as iterator.

getConfigProperties

public Enumeration getConfigProperties()

getConfigProperty

public String getConfigProperty(String key)
Returns the configuration property with the specified key.

Parameters: key the property key.

Returns: the property value.

getConfigProperty

public 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).

If the property is not defined in this configuration, the code will lookup the property in the parent configuration.

Parameters: key the property key. defaultValue the default value.

Returns: the property value.

setConfigProperty

public void setConfigProperty(String key, String value)
Sets the value of a configuration property.

Parameters: key the property key. value the property value.