Print

Print


Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util on MAIN
Constant.java+16-91.1 -> 1.2
Method added to get value of constant as double.

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util
Constant.java 1.1 -> 1.2
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();
+    }
 }
CVSspam 0.2.8