| java.lang.Object org.compass.core.util.config.AbstractConfigurationHelper
All known Subclasses: org.compass.core.util.config.XmlConfigurationHelper,
AbstractConfigurationHelper | abstract public class AbstractConfigurationHelper implements ConfigurationHelper(Code) | | This is an abstract Configuration implementation that deals
with methods that can be abstracted away from underlying implementations.
|
Method Summary | |
public String | getAttribute(String name, String defaultValue) Returns the value of the attribute specified by its name as a
String . | public boolean | getAttributeAsBoolean(String name) Returns the value of the attribute specified by its name as a
boolean . | public boolean | getAttributeAsBoolean(String name, boolean defaultValue) Returns the value of the attribute specified by its name as a
boolean . | public float | getAttributeAsFloat(String name) Returns the value of the attribute specified by its name as a
float . | public float | getAttributeAsFloat(String name, float defaultValue) Returns the value of the attribute specified by its name as a
float . | public int | getAttributeAsInteger(String name) Returns the value of the attribute specified by its name as an
int . | public int | getAttributeAsInteger(String name, int defaultValue) Returns the value of the attribute specified by its name as an
int . | public long | getAttributeAsLong(String name) Returns the value of the attribute specified by its name as a
long . | public long | getAttributeAsLong(String name, long defaultValue) Returns the value of the attribute specified by its name as a
long . | public ConfigurationHelper | getChild(String name) Return the first Configuration object child of this
associated with the given name. | public ConfigurationHelper | getChild(String name, boolean createNew) Return the first Configuration object child of this
associated with the given name. | abstract protected String | getPrefix() Returns the prefix of the namespace. | public String | getValue(String defaultValue) Returns the value of the configuration element as a String . | public boolean | getValueAsBoolean() Returns the value of the configuration element as a boolean . | public boolean | getValueAsBoolean(boolean defaultValue) Returns the value of the configuration element as a boolean . | public float | getValueAsFloat() Returns the value of the configuration element as a float . | public float | getValueAsFloat(float defaultValue) Returns the value of the configuration element as a float . | public int | getValueAsInteger() Returns the value of the configuration element as an int . | public int | getValueAsInteger(int defaultValue) Returns the value of the configuration element as an int . | public long | getValueAsLong() Returns the value of the configuration element as a long . | public long | getValueAsLong(long defaultValue) Returns the value of the configuration element as a long . | public String | toString() The toString() operation is used for debugging information. |
getAttribute | public String getAttribute(String name, String defaultValue)(Code) | | Returns the value of the attribute specified by its name as a
String .
|
getAttributeAsBoolean | public boolean getAttributeAsBoolean(String name) throws ConfigurationException(Code) | | Returns the value of the attribute specified by its name as a
boolean .
|
getAttributeAsBoolean | public boolean getAttributeAsBoolean(String name, boolean defaultValue)(Code) | | Returns the value of the attribute specified by its name as a
boolean .
|
getAttributeAsFloat | public float getAttributeAsFloat(String name, float defaultValue)(Code) | | Returns the value of the attribute specified by its name as a
float .
|
getAttributeAsInteger | public int getAttributeAsInteger(String name) throws ConfigurationException(Code) | | Returns the value of the attribute specified by its name as an
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.
|
getAttributeAsInteger | public int getAttributeAsInteger(String name, int defaultValue)(Code) | | Returns the value of the attribute specified by its name as an
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.
|
getAttributeAsLong | public long getAttributeAsLong(String name) throws ConfigurationException(Code) | | Returns the value of the attribute specified by its name as a
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.
|
getAttributeAsLong | public long getAttributeAsLong(String name, long defaultValue)(Code) | | Returns the value of the attribute specified by its name as a
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.
|
getChild | public ConfigurationHelper getChild(String name)(Code) | | Return the first Configuration object child of this
associated with the given name. If no such child exists, a new one will
be created.
|
getChild | public ConfigurationHelper getChild(String name, boolean createNew)(Code) | | Return the first Configuration object child of this
associated with the given name.
|
getPrefix | abstract protected String getPrefix() throws ConfigurationException(Code) | | Returns the prefix of the namespace. This is only used as a serialization
hint, therefore is not part of the client API. It should be included in
all Configuration implementations though.
A non-null String (defaults to "") throws: ConfigurationException - if no prefix was defined (prefix is null . |
getValue | public String getValue(String defaultValue)(Code) | | Returns the value of the configuration element as a String .
|
getValueAsBoolean | public boolean getValueAsBoolean() throws ConfigurationException(Code) | | Returns the value of the configuration element as a boolean .
|
getValueAsBoolean | public boolean getValueAsBoolean(boolean defaultValue)(Code) | | Returns the value of the configuration element as a boolean .
|
getValueAsFloat | public float getValueAsFloat() throws ConfigurationException(Code) | | Returns the value of the configuration element as a float .
|
getValueAsFloat | public float getValueAsFloat(float defaultValue)(Code) | | Returns the value of the configuration element as a float .
|
getValueAsInteger | public int getValueAsInteger() throws ConfigurationException(Code) | | Returns the value of the configuration element as an 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.
|
getValueAsInteger | public int getValueAsInteger(int defaultValue)(Code) | | Returns the value of the configuration element as an 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.
|
getValueAsLong | public long getValueAsLong() throws ConfigurationException(Code) | | Returns the value of the configuration element as a 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.
|
getValueAsLong | public long getValueAsLong(long defaultValue)(Code) | | Returns the value of the configuration element as a 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.
|
toString | public String toString()(Code) | | The toString() operation is used for debugging information. It does not
create a deep reproduction of this configuration and all child
configurations, instead it displays the name, value, and location.
getName() + "::" + getValue() + ":@" + getLocation(); |
|
|