public class ExtendedConfigurationWrapper extends Object implements ExtendedConfiguration
| Constructor and Description |
|---|
ExtendedConfigurationWrapper(Configuration parent)
Creates a wrapper around the given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a clone of the object.
|
Iterator<String> |
findPropertyKeys(String prefix)
Returns all keys with the given prefix.
|
boolean |
getBoolProperty(String name)
Returns the boolean value of a given configuration property.
|
boolean |
getBoolProperty(String name,
boolean defaultValue)
Returns the boolean value of a given configuration property.
|
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).
|
int |
getIntProperty(String name)
Returns a given property as int value.
|
int |
getIntProperty(String name,
int defaultValue)
Returns a given property as int value.
|
boolean |
isPropertySet(String name)
Checks, whether a given property is defined.
|
public ExtendedConfigurationWrapper(Configuration parent)
parent - the wrapped up configuration.NullPointerException - if the parent is null.public boolean getBoolProperty(String name)
getBoolProperty in interface ExtendedConfigurationname - the name of the propertypublic boolean getBoolProperty(String name, boolean defaultValue)
getBoolProperty in interface ExtendedConfigurationname - the name of the propertydefaultValue - the default value to be returned if the property is not setpublic int getIntProperty(String name)
getIntProperty in interface ExtendedConfigurationname - the name of the propertypublic int getIntProperty(String name, int defaultValue)
getIntProperty in interface ExtendedConfigurationname - the name of the propertydefaultValue - the value to be returned if the property is no integer valuepublic boolean isPropertySet(String name)
isPropertySet in interface ExtendedConfigurationname - the name of the propertypublic Iterator<String> findPropertyKeys(String prefix)
findPropertyKeys in interface Configurationprefix - the prefixpublic 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 Enumeration<String> getConfigProperties()
ConfigurationgetConfigProperties in interface Configurationpublic Object clone() throws CloneNotSupportedException
Configurationclone in interface Configurationclone in class ObjectCloneNotSupportedException - if cloning is not supported for some reason.