org.apache.avalon.framework.configuration
public abstract class AbstractConfiguration extends Object implements Configuration
Configuration
implementation that deals
with methods that can be abstracted away from underlying implementations.
Version: $Id: AbstractConfiguration.java 156533 2005-03-08 08:51:40 -0600 (Tue, 08 Mar 2005) leif $
Method Summary | |
---|---|
String | getAttribute(String name, String defaultValue)
Returns the value of the attribute specified by its name as a
String .
|
boolean | getAttributeAsBoolean(String name)
Returns the value of the attribute specified by its name as a
boolean .
|
boolean | getAttributeAsBoolean(String name, boolean defaultValue)
Returns the value of the attribute specified by its name as a
boolean .
|
double | getAttributeAsDouble(String name)
Returns the value of the attribute specified by its name as a
double .
|
double | getAttributeAsDouble(String name, double defaultValue)
Returns the value of the attribute specified by its name as a
double .
|
float | getAttributeAsFloat(String name)
Returns the value of the attribute specified by its name as a
float .
|
float | getAttributeAsFloat(String name, float defaultValue)
Returns the value of the attribute specified by its name as a
float .
|
int | getAttributeAsInteger(String name)
Returns the value of the attribute specified by its name as an
int .
|
int | getAttributeAsInteger(String name, int defaultValue)
Returns the value of the attribute specified by its name as an
int .
|
long | getAttributeAsLong(String name)
Returns the value of the attribute specified by its name as a
long .
|
long | getAttributeAsLong(String name, long defaultValue)
Returns the value of the attribute specified by its name as a
long .
|
Configuration | getChild(String name)
Return the first Configuration object child of this
associated with the given name. |
Configuration | getChild(String name, boolean createNew)
Return the first Configuration object child of this
associated with the given name.
|
protected abstract String | getPrefix()
Returns the prefix of the namespace. |
String | getValue(String defaultValue)
Returns the value of the configuration element as a String .
|
boolean | getValueAsBoolean()
Returns the value of the configuration element as a boolean .
|
boolean | getValueAsBoolean(boolean defaultValue)
Returns the value of the configuration element as a boolean .
|
double | getValueAsDouble()
Returns the value of the configuration element as a double .
|
double | getValueAsDouble(double defaultValue)
Returns the value of the configuration element as a double .
|
float | getValueAsFloat()
Returns the value of the configuration element as a float .
|
float | getValueAsFloat(float defaultValue)
Returns the value of the configuration element as a float .
|
int | getValueAsInteger()
Returns the value of the configuration element as an int .
|
int | getValueAsInteger(int defaultValue)
Returns the value of the configuration element as an int .
|
long | getValueAsLong()
Returns the value of the configuration element as a long .
|
long | getValueAsLong(long defaultValue)
Returns the value of the configuration element as a long .
|
boolean | isFalse(String value) |
boolean | isTrue(String value) |
String | toString()
The toString() operation is used for debugging information. |
String
.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
boolean
.
Parameters: name the name of the attribute
Returns: the value
Throws: ConfigurationException if an error occurs
boolean
.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
double
.
Parameters: name the name of the attribute
Returns: the value
Throws: ConfigurationException if an error occurs
double
.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
float
.
Parameters: name the name of the attribute
Returns: the value
Throws: ConfigurationException if an error occurs
float
.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
int
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: name the name of the attribute
Returns: the value
Throws: ConfigurationException if an error occurs
int
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
long
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: name the name of the attribute
Returns: the value
Throws: ConfigurationException if an error occurs
long
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: name the name of the attribute defaultValue the default value to return if value malformed or empty
Returns: the value
Configuration
object child of this
associated with the given name. If no such child exists, a new one
will be created.
Parameters: name the name of the child
Returns: the child Configuration
Configuration
object child of this
associated with the given name.
Parameters: name the name of the child createNew true if you want to create a new Configuration object if none exists
Returns: the child Configuration
Returns: A non-null String (defaults to "")
Throws: ConfigurationException if no prefix was defined (prefix is
null
.
Since: 4.1
String
.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
boolean
.
Returns: the value
Throws: ConfigurationException if an error occurs
boolean
.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
double
.
Returns: the value
Throws: ConfigurationException if an error occurs
double
.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
float
.
Returns: the value
Throws: ConfigurationException if an error occurs
float
.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
int
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Returns: the value
Throws: ConfigurationException if an error occurs
int
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
long
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Returns: the value
Throws: ConfigurationException if an error occurs
long
.
Hexadecimal numbers begin with 0x, Octal numbers begin with 0o and binary
numbers begin with 0b, all other values are assumed to be decimal.
Parameters: defaultValue the default value to return if value malformed or empty
Returns: the value
Returns: getName() + "::" + getValue() + ":@" + getLocation();