--- excalibur-configuration-1.1/src/java/org/apache/excalibur/configuration/CascadingConfiguration.java 2003-09-12 19:01:11.000000000 +0200
+++ excalibur-configuration-1.1/src/java/org/apache/excalibur/configuration/CascadingConfiguration.java-gil 2009-07-03 19:12:18.000000000 +0200
@@ -342,6 +342,26 @@
}
/**
+ * Return the double
value of the specified parameter contained
+ * in this node.
+ * @param paramName The name of the parameter you ask the value of.
+ * @return double value of attribute
+ * @exception ConfigurationException If no parameter with that name exists.
+ * or if conversion to float
fails.
+ */
+ public double getAttributeAsDouble( String paramName ) throws ConfigurationException
+ {
+ try
+ {
+ return m_base.getAttributeAsDouble( paramName );
+ }
+ catch( ConfigurationException e )
+ {
+ return m_parent.getAttributeAsDouble( paramName );
+ }
+ }
+
+ /**
* Return the boolean
value of the specified parameter contained
* in this node.
*
@@ -417,6 +437,24 @@
}
/**
+ * Return the double
value of the node.
+ *
+ * @return the value of the node.
+ * @exception ConfigurationException If conversion to double
fails.
+ */
+ public double getValueAsDouble() throws ConfigurationException
+ {
+ try
+ {
+ return m_base.getValueAsDouble();
+ }
+ catch( ConfigurationException e )
+ {
+ return m_parent.getValueAsDouble();
+ }
+ }
+
+ /**
* Return the boolean
value of the node.
*
* @return the value of the node.
@@ -537,6 +575,27 @@
}
/**
+ * Returns the value of the configuration element as a double
.
+ * If the configuration value is not set, the default value will be
+ * used.
+ *
+ * @param defaultValue The default value desired.
+ * @return double value of the Configuration
, or default
+ * if none specified.
+ */
+ public double getValueAsDouble( double defaultValue )
+ {
+ try
+ {
+ return m_base.getValueAsDouble();
+ }
+ catch( ConfigurationException e )
+ {
+ return m_parent.getValueAsDouble( defaultValue );
+ }
+ }
+
+ /**
* Returns the value of the configuration element as a boolean
.
* If the configuration value is not set, the default value will be
* used.
@@ -651,6 +710,29 @@
/**
* Returns the value of the attribute specified by its name as a
+ * double
, or the default value if no attribute by
+ * that name exists or is empty.
+ *
+ * @param name The name of the attribute you ask the value of.
+ * @param defaultValue The default value desired.
+ * @return double value of attribute. It will return the default
+ * value if the named attribute does not exist, or if
+ * the value is not set.
+ */
+ public double getAttributeAsDouble( String name, double defaultValue )
+ {
+ try
+ {
+ return m_base.getAttributeAsDouble( name );
+ }
+ catch( ConfigurationException e )
+ {
+ return m_parent.getAttributeAsDouble( name, defaultValue );
+ }
+ }
+
+ /**
+ * Returns the value of the attribute specified by its name as a
* boolean
, or the default value if no attribute by
* that name exists or is empty.
*