Interface Configuration
-
- All Superinterfaces:
Cloneable
,Serializable
- All Known Subinterfaces:
ExtendedConfiguration
,ModifiableConfiguration
- All Known Implementing Classes:
DefaultConfiguration
,ExtendedConfigurationWrapper
,HierarchicalConfiguration
,PackageManager.PackageConfiguration
,PropertyFileConfiguration
,SystemPropertyConfiguration
public interface Configuration extends Serializable, Cloneable
A simple query interface for a configuration.- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
clone()
Returns a clone of the object.Iterator<String>
findPropertyKeys(String prefix)
Returns all keys with the given prefix.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).
-
-
-
Method Detail
-
getConfigProperty
String getConfigProperty(String key)
Returns the configuration property with the specified key.- Parameters:
key
- the property key.- Returns:
- the property value.
-
getConfigProperty
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.
-
findPropertyKeys
Iterator<String> findPropertyKeys(String prefix)
Returns all keys with the given prefix.- Parameters:
prefix
- the prefix- Returns:
- the iterator containing all keys with that prefix
-
getConfigProperties
Enumeration<String> getConfigProperties()
Returns the configuration properties.- Returns:
- The configuration properties.
-
clone
Object clone() throws CloneNotSupportedException
Returns a clone of the object.- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if cloning is not supported for some reason.
-
-