1 package org.lcsim.geometry.compact;
2
3 import org.jdom.Element;
4 import org.jdom.DataConversionException;
5
6
7
8
9
10 public class Limit
11 {
12 private String name;
13 private String particles;
14 private String unit;
15 private double value;
16
17
18 protected Limit(Element node)
19 {
20 name = node.getAttributeValue("name");
21 particles = node.getAttributeValue("particles");
22
23 try
24 {
25 value = node.getAttribute("value").getDoubleValue();
26 }
27 catch (DataConversionException dce)
28 {
29 throw new RuntimeException("invalid value attribute: " + value, dce);
30 }
31
32 unit = node.getAttributeValue("unit");
33 }
34
35 public String getName()
36 {
37 return name;
38 }
39
40 public String getParticles()
41 {
42 return particles;
43 }
44
45 public String getUnit()
46 {
47 return unit;
48 }
49
50 public double getValue()
51 {
52 return value;
53 }
54 }