public class ExtendedConfigurationWrapper extends java.lang.Object implements ExtendedConfiguration
Constructor and Description |
---|
ExtendedConfigurationWrapper(Configuration parent)
Creates a wrapper around the given configuration.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this instance.
|
java.util.Iterator |
findPropertyKeys(java.lang.String prefix)
Returns all keys with the given prefix.
|
boolean |
getBoolProperty(java.lang.String name)
Returns the boolean value of a given configuration property.
|
boolean |
getBoolProperty(java.lang.String name,
boolean defaultValue)
Returns the boolean value of a given configuration property.
|
java.util.Enumeration |
getConfigProperties()
Returns an enumeration of the configuration properties.
|
java.lang.String |
getConfigProperty(java.lang.String key)
Returns the configuration property with the specified key.
|
java.lang.String |
getConfigProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the configuration property with the specified key (or the specified default
value if there is no such property).
|
int |
getIntProperty(java.lang.String name)
Returns a given property as int value.
|
int |
getIntProperty(java.lang.String name,
int defaultValue)
Returns a given property as int value.
|
boolean |
isPropertySet(java.lang.String name)
Checks, whether a given property is defined.
|
public ExtendedConfigurationWrapper(Configuration parent)
parent
- the wrapped up configuration.java.lang.NullPointerException
- if the parent is null.public boolean getBoolProperty(java.lang.String name)
getBoolProperty
in interface ExtendedConfiguration
name
- the name of the propertypublic boolean getBoolProperty(java.lang.String name, boolean defaultValue)
getBoolProperty
in interface ExtendedConfiguration
name
- the name of the propertydefaultValue
- the default value to be returned if the property is not setpublic int getIntProperty(java.lang.String name)
getIntProperty
in interface ExtendedConfiguration
name
- the name of the propertypublic int getIntProperty(java.lang.String name, int defaultValue)
getIntProperty
in interface ExtendedConfiguration
name
- the name of the propertydefaultValue
- the value to be returned if the property is no integer valuepublic boolean isPropertySet(java.lang.String name)
isPropertySet
in interface ExtendedConfiguration
name
- the name of the propertypublic java.util.Iterator findPropertyKeys(java.lang.String prefix)
findPropertyKeys
in interface Configuration
prefix
- the prefixpublic java.lang.String getConfigProperty(java.lang.String key)
getConfigProperty
in interface Configuration
key
- the property key.public java.lang.String getConfigProperty(java.lang.String key, java.lang.String defaultValue)
getConfigProperty
in interface Configuration
key
- the property key.defaultValue
- the default value.public java.util.Enumeration getConfigProperties()
getConfigProperties
in interface Configuration
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Configuration
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if there is a problem cloning.