1 package org.lcsim.geometry.compact.converter.lcdd.util;
2
3 import org.jdom.DataConversionException;
4
5
6
7
8
9
10 public class Constant extends RefElement
11 {
12 public Constant(String name, double value)
13 {
14 this(name,String.valueOf(value));
15 }
16 public Constant(String name, String value)
17 {
18 super("constant",name);
19 setAttribute("value",value);
20 }
21
22 public double getConstantValue() throws DataConversionException
23 {
24 return getAttribute("value").getDoubleValue();
25 }
26 }