package org.wamblee.gps.geometry;
+import java.io.Serializable;
+
/**
* Coordinates in some 3-dimensional coordinate system.
*/
-public class Coordinates {
+public class Coordinates implements Serializable {
private double _x1;
private double _x2;
return _x3;
}
+ public double getX(int i) {
+ switch (i) {
+ case 1: return _x1;
+ case 2: return _x2;
+ case 3: return _x3;
+ }
+ throw new IllegalArgumentException("coordinate out of range " + i);
+ }
+
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/