1 package org.lcsim.geometry.compact;
2
3 import org.jdom.DataConversionException;
4 import org.jdom.Element;
5
6
7
8
9
10 public class Constant
11 {
12 private String name;
13 private double value;
14
15 public Constant(String name, double value)
16 {
17 this.name = name;
18 this.value = value;
19 }
20
21
22
23
24
25
26 protected Constant(Element constant) throws DataConversionException
27 {
28 name = constant.getAttributeValue("name");
29 value = constant.getAttribute("value").getDoubleValue();
30 }
31
32
33
34
35 public String getName()
36 {
37 return name;
38 }
39
40
41
42
43 public double getValue()
44 {
45 return value;
46 }
47 }