org.apache.avalon.framework.configuration
public class DefaultImmutableConfiguration extends AbstractConfiguration implements Serializable
Configuration
interface.
Version: $Id: DefaultImmutableConfiguration.java 30977 2004-07-30 03:57:54 -0500 (Fri, 30 Jul 2004) niclas $
Field Summary | |
---|---|
protected static Configuration[] | EMPTY_ARRAY
An empty (length zero) array of configuration objects. |
HashMap | m_attributes |
ArrayList | m_children |
String | m_location |
String | m_name |
String | m_namespace |
String | m_prefix |
String | m_value |
Constructor Summary | |
---|---|
DefaultImmutableConfiguration(Configuration config)
Deep copy constructor.
|
Method Summary | |
---|---|
boolean | equals(Object other)
Compare if this configuration is equal to another.
|
String | getAttribute(String name)
Returns the value of the attribute specified by its name as a
String .
|
String[] | getAttributeNames()
Return an array of all attribute names. |
Configuration | getChild(String name, boolean createNew)
Return the first Configuration object child of this
associated with the given name. |
int | getChildCount()
Return count of children. |
Configuration[] | getChildren()
Return an array of Configuration
elements containing all node children.
|
Configuration[] | getChildren(String name)
Return an array of Configuration objects
children of this associated with the given name.
|
String | getLocation()
Returns a description of location of element. |
String | getName()
Returns the name of this configuration element. |
String | getNamespace()
Returns the namespace of this configuration element |
protected String | getPrefix()
Returns the prefix of the namespace |
String | getValue(String defaultValue)
Returns the value of the configuration element as a String .
|
String | getValue()
Returns the value of the configuration element as a String .
|
int | hashCode()
Obtaine the hashcode for this configuration.
|
Parameters: config the Configuration
to do a deep copy of.
Throws: ConfigurationException if an error occurs when copying
Parameters: other The other configuration
Returns: true
if they are the same.
String
.
Parameters: name a String
value
Returns: a String
value
Throws: ConfigurationException If the attribute is not present.
Returns: a String[]
value
Configuration
object child of this
associated with the given name.Parameters: name a String
value createNew a boolean
value
Returns: a Configuration
value
Returns: an int
value
Configuration
elements containing all node children.
Returns: The child nodes with name
Configuration
objects
children of this associated with the given name.
null
.
Parameters: name The name of the required children Configuration
.
Returns: a Configuration[]
value
Returns: a String
value
Returns: a String
value
Returns: a String
value
Throws: ConfigurationException if an error occurs
Since: 4.1
Returns: a String
value
Throws: ConfigurationException if prefix is not present (null
).
Since: 4.1
String
.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: a String
value
String
.
Returns: a String
value
Throws: ConfigurationException If the value is not present.
Returns: the hashcode.