Commit in GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd/util on MAIN | |||
Box.java | +52 | -68 | 1.3 -> 1.4 |
reformat
diff -u -r1.3 -r1.4 --- Box.java 1 Nov 2007 00:37:20 -0000 1.3 +++ Box.java 12 Sep 2012 23:30:52 -0000 1.4 @@ -2,75 +2,59 @@
import org.jdom.DataConversionException;
-
/**
- *
+ *
* @author tonyj */
-public class Box extends Solid -{ - /** Creates a new instance of Box */ - public Box(String name) - { - super("box",name); - setAttribute("x",String.valueOf(0.)); - setAttribute("y",String.valueOf(0.)); - setAttribute("z",String.valueOf(0.)); - } - - public Box(String name, double x, double y, double z) - { - super("box",name); - setX(x); - setY(y); - setZ(z); - } - - public void setX(double x) - { - setAttribute("x",String.valueOf(x)); - } - - public void setY(double y) - { - setAttribute("y",String.valueOf(y)); - } - - public void setZ(double z) - { - setAttribute("z",String.valueOf(z)); - } - - public double getX() - { - try { - return getAttribute("x").getDoubleValue(); - } - catch (DataConversionException x) - { - throw new RuntimeException(x); - } - } - - public double getY() - { - try { - return getAttribute("y").getDoubleValue(); - } - catch (DataConversionException x) - { - throw new RuntimeException(x); - } - } - - public double getZ() - { - try { - return getAttribute("z").getDoubleValue(); - } - catch (DataConversionException x) - { - throw new RuntimeException(x); - } - }
+public class Box extends Solid { + /** Creates a new instance of Box */ + public Box(String name) { + super("box", name); + setAttribute("x", String.valueOf(0.)); + setAttribute("y", String.valueOf(0.)); + setAttribute("z", String.valueOf(0.)); + } + + public Box(String name, double x, double y, double z) { + super("box", name); + setX(x); + setY(y); + setZ(z); + } + + public void setX(double x) { + setAttribute("x", String.valueOf(x)); + } + + public void setY(double y) { + setAttribute("y", String.valueOf(y)); + } + + public void setZ(double z) { + setAttribute("z", String.valueOf(z)); + } + + public double getX() { + try { + return getAttribute("x").getDoubleValue(); + } catch (DataConversionException x) { + throw new RuntimeException(x); + } + } + + public double getY() { + try { + return getAttribute("y").getDoubleValue(); + } catch (DataConversionException x) { + throw new RuntimeException(x); + } + } + + public double getZ() { + try { + return getAttribute("z").getDoubleValue(); + } catch (DataConversionException x) { + throw new RuntimeException(x); + } + }
}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1