|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The configuration object represents hierarchial configuration data. The data represented by this object is a simplified XML format. Configuration objects are unable to represent namespace information and elements can not have mixed content. ie Configuration elements can not have both a value and child elements.
Method Summary | |
java.lang.String |
getAttribute(java.lang.String name)
Return attribute value with specified name. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Return attribute value with specified name. |
boolean |
getAttributeAsBoolean(java.lang.String name)
Return attribute value with specified name as a boolean. |
boolean |
getAttributeAsBoolean(java.lang.String name,
boolean defaultValue)
Return attribute value with specified name as a boolean. |
float |
getAttributeAsFloat(java.lang.String name)
Return attribute value with specified name as afloat. |
float |
getAttributeAsFloat(java.lang.String name,
float defaultValue)
Return attribute value with specified name as a float. |
int |
getAttributeAsInteger(java.lang.String name)
Return attribute value with specified name as an integer. |
int |
getAttributeAsInteger(java.lang.String name,
int defaultValue)
Return attribute value with specified name as an integer. |
long |
getAttributeAsLong(java.lang.String name)
Return attribute value with specified name as a long. |
long |
getAttributeAsLong(java.lang.String name,
long defaultValue)
Return attribute value with specified name as a long. |
java.lang.String[] |
getAttributeNames()
Return an array of all the attribute names. |
Configuration |
getChild(java.lang.String name)
Return a child Configuration element with specified name. |
Configuration |
getChild(java.lang.String name,
boolean createChild)
Return a child Configuration element with specified name. |
Configuration[] |
getChildren()
Return an array of all the child elements. |
Configuration[] |
getChildren(java.lang.String name)
Return an array of all the child elements with specified name. |
java.lang.String |
getLocation()
Return the location of configuration element. |
java.lang.String |
getName()
Return the name of the configuration element. |
java.lang.String |
getPath()
Return the path to the configuration element. |
java.lang.String |
getValue()
Return text value of element. |
java.lang.String |
getValue(java.lang.String defaultValue)
Return text value of element. |
boolean |
getValueAsBoolean()
Return text value of element as a boolean. |
boolean |
getValueAsBoolean(boolean defaultValue)
Return text value of element as a boolean. |
float |
getValueAsFloat()
Return text value of element as a float. |
float |
getValueAsFloat(float defaultValue)
Return text value of element as a float. |
int |
getValueAsInteger()
Return text value of element as an integer. |
int |
getValueAsInteger(int defaultValue)
Return text value of element as an integer. |
long |
getValueAsLong()
Return text value of element as a long. |
long |
getValueAsLong(long defaultValue)
Return text value of element as a long. |
Method Detail |
public java.lang.String getName()
public java.lang.String getPath()
public java.lang.String getLocation()
public Configuration[] getChildren()
public Configuration[] getChildren(java.lang.String name)
name
- the name of child configuration objects
public Configuration getChild(java.lang.String name)
name
- the name of child configuration object
public Configuration getChild(java.lang.String name, boolean createChild)
name
- the name of child configuration objectcreateChild
- true if child should be created if it does not exist
public java.lang.String getValue() throws ConfigurationException
ConfigurationException
- if no value in elementpublic java.lang.String getValue(java.lang.String defaultValue)
defaultValue
- the default value
public int getValueAsInteger() throws ConfigurationException
ConfigurationException
- if no value in element
or value can not be converted to correct typepublic int getValueAsInteger(int defaultValue)
defaultValue
- the default value
public long getValueAsLong() throws ConfigurationException
ConfigurationException
- if no value in element
or value can not be converted to correct typepublic long getValueAsLong(long defaultValue)
defaultValue
- the default value
public boolean getValueAsBoolean() throws ConfigurationException
ConfigurationException
- if no value in element
or value can not be converted to correct typepublic boolean getValueAsBoolean(boolean defaultValue)
defaultValue
- the default value
public float getValueAsFloat() throws ConfigurationException
ConfigurationException
- if no value in element
or value can not be converted to correct typepublic float getValueAsFloat(float defaultValue)
defaultValue
- the default value
public java.lang.String[] getAttributeNames()
public java.lang.String getAttribute(java.lang.String name) throws ConfigurationException
name
- the attribute name
ConfigurationException
- if no attribute with
specified namepublic java.lang.String getAttribute(java.lang.String name, java.lang.String defaultValue)
name
- the attribute namedefaultValue
- the default value
public int getAttributeAsInteger(java.lang.String name) throws ConfigurationException
name
- the attribute name
ConfigurationException
- if no attribute with
specified name or attribute can not be converted
to correct typepublic int getAttributeAsInteger(java.lang.String name, int defaultValue)
name
- the attribute namedefaultValue
- the default value
public long getAttributeAsLong(java.lang.String name) throws ConfigurationException
name
- the attribute name
ConfigurationException
- if no attribute with
specified name or attribute can not be converted
to correct typepublic long getAttributeAsLong(java.lang.String name, long defaultValue)
name
- the attribute namedefaultValue
- the default value
public boolean getAttributeAsBoolean(java.lang.String name) throws ConfigurationException
name
- the attribute name
ConfigurationException
- if no attribute with
specified name or attribute can not be converted
to correct typepublic boolean getAttributeAsBoolean(java.lang.String name, boolean defaultValue)
name
- the attribute namedefaultValue
- the default value
public float getAttributeAsFloat(java.lang.String name) throws ConfigurationException
name
- the attribute name
ConfigurationException
- if no attribute with
specified name or attribute can not be converted
to correct typepublic float getAttributeAsFloat(java.lang.String name, float defaultValue)
name
- the attribute namedefaultValue
- the default value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |