GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util
diff -u -r1.1 -r1.2
--- Constant.java 28 Feb 2005 07:33:47 -0000 1.1
+++ Constant.java 30 Jun 2005 00:35:48 -0000 1.2
@@ -1,5 +1,7 @@
package org.lcsim.geometry.compact.converter.lcdd.util;
+import org.jdom.DataConversionException;
+
/**
*
@@ -7,13 +9,18 @@
*/
public class Constant extends RefElement
{
- public Constant(String name, double value)
- {
- this(name,String.valueOf(value));
- }
- public Constant(String name, String value)
- {
- super("constant",name);
- setAttribute("value",value);
- }
+ public Constant(String name, double value)
+ {
+ this(name,String.valueOf(value));
+ }
+ public Constant(String name, String value)
+ {
+ super("constant",name);
+ setAttribute("value",value);
+ }
+
+ public double getConstantValue() throws DataConversionException
+ {
+ return getAttribute("value").getDoubleValue();
+ }
}