|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.configuration.AbstractConfiguration
This is an abstract Configuration
implementation that deals
with methods that can be abstracted away from underlying implementations.
Constructor Summary | |
AbstractConfiguration()
|
Method Summary | |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns the value of the attribute specified by its name as a String . |
boolean |
getAttributeAsBoolean(java.lang.String name)
Returns the value of the attribute specified by its name as a boolean . |
boolean |
getAttributeAsBoolean(java.lang.String name,
boolean defaultValue)
Returns the value of the attribute specified by its name as a boolean . |
float |
getAttributeAsFloat(java.lang.String name)
Returns the value of the attribute specified by its name as a float . |
float |
getAttributeAsFloat(java.lang.String name,
float defaultValue)
Returns the value of the attribute specified by its name as a float . |
int |
getAttributeAsInteger(java.lang.String name)
Returns the value of the attribute specified by its name as an int . |
int |
getAttributeAsInteger(java.lang.String name,
int defaultValue)
Returns the value of the attribute specified by its name as an int . |
long |
getAttributeAsLong(java.lang.String name)
Returns the value of the attribute specified by its name as a long . |
long |
getAttributeAsLong(java.lang.String name,
long defaultValue)
Returns the value of the attribute specified by its name as a long . |
Configuration |
getChild(java.lang.String name)
Return the first Configuration object child of this
associated with the given name. |
Configuration |
getChild(java.lang.String name,
boolean createNew)
Return the first Configuration object child of this
associated with the given name. |
java.lang.String |
getValue(java.lang.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 . |
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 . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.avalon.framework.configuration.Configuration |
getAttribute, getAttributeNames, getChildren, getChildren, getLocation, getName, getValue |
Constructor Detail |
public AbstractConfiguration()
Method Detail |
public int getValueAsInteger() throws ConfigurationException
int
.getValueAsInteger
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
ConfigurationException
- If conversion to int
fails.public int getValueAsInteger(int defaultValue)
int
.getValueAsInteger
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
defaultValue
- The default value desired.Configuration
, or default
if none specified.public long getValueAsLong() throws ConfigurationException
long
.getValueAsLong
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
ConfigurationException
- If conversion to long
fails.public long getValueAsLong(long defaultValue)
long
.getValueAsLong
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
defaultValue
- The default value desired.Configuration
, or default
if none specified.public float getValueAsFloat() throws ConfigurationException
float
.getValueAsFloat
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
ConfigurationException
- If conversion to float
fails.public float getValueAsFloat(float defaultValue)
float
.getValueAsFloat
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
defaultValue
- The default value desired.Configuration
, or default
if none specified.public boolean getValueAsBoolean() throws ConfigurationException
boolean
.getValueAsBoolean
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
ConfigurationException
- If conversion to boolean
fails.public boolean getValueAsBoolean(boolean defaultValue)
boolean
.getValueAsBoolean
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
defaultValue
- The default value desired.Configuration
, or default
if none specified.public java.lang.String getValue(java.lang.String defaultValue)
String
.getValue
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
defaultValue
- The default value desired.Configuration
, or default
if none specified.public int getAttributeAsInteger(java.lang.String name) throws ConfigurationException
int
.getAttributeAsInteger
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
paramName
- The name of the parameter you ask the value of.ConfigurationException
- If no parameter with that name exists.
or if conversion to int
fails.public int getAttributeAsInteger(java.lang.String name, int defaultValue)
int
.getAttributeAsInteger
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.public long getAttributeAsLong(java.lang.String name) throws ConfigurationException
long
.getAttributeAsLong
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
paramName
- The name of the parameter you ask the value of.ConfigurationException
- If no parameter with that name exists.
or if conversion to long
fails.public long getAttributeAsLong(java.lang.String name, long defaultValue)
long
.getAttributeAsLong
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.public float getAttributeAsFloat(java.lang.String name) throws ConfigurationException
float
.getAttributeAsFloat
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
paramName
- The name of the parameter you ask the value of.ConfigurationException
- If no parameter with that name exists.
or if conversion to float
fails.public float getAttributeAsFloat(java.lang.String name, float defaultValue)
float
.getAttributeAsFloat
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.public boolean getAttributeAsBoolean(java.lang.String name) throws ConfigurationException
boolean
.getAttributeAsBoolean
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
paramName
- The name of the parameter you ask the value of.ConfigurationException
- If no parameter with that name exists.
or if conversion to boolean
fails.public boolean getAttributeAsBoolean(java.lang.String name, boolean defaultValue)
boolean
.getAttributeAsBoolean
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.public java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
String
.getAttribute
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
name
- The name of the attribute you ask the value of.defaultValue
- The default value desired.public Configuration getChild(java.lang.String name)
Configuration
object child of this
associated with the given name.getChild
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
child
- The name of the child node.public Configuration getChild(java.lang.String name, boolean createNew)
Configuration
object child of this
associated with the given name.getChild
in interface Configuration
org.apache.avalon.framework.configuration.Configuration
child
- The name of the child node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |