DataPoint.java
Go to the documentation of this file.
00001 package edu.wpi.rail.jinteractiveworld.data;
00002 
00009 public class DataPoint {
00010 
00011     private double x, y, z, theta;
00012 
00013     public DataPoint() {
00014         this(0, 0, 0, 0);
00015     }
00016 
00017     public DataPoint(double x, double y, double z, double theta) {
00018         this.x = x;
00019         this.y = y;
00020         this.z = z;
00021         this.theta = theta;
00022     }
00023 
00024     public double getX() {
00025         return x;
00026     }
00027 
00028     public void setX(double x) {
00029         this.x = x;
00030     }
00031 
00032     public double getY() {
00033         return y;
00034     }
00035 
00036     public void setY(double y) {
00037         this.y = y;
00038     }
00039 
00040     public double getZ() {
00041         return z;
00042     }
00043 
00044     public void setZ(double z) {
00045         this.z = z;
00046     }
00047 
00048     public double getTheta() {
00049         return theta;
00050     }
00051 
00052     public void setTheta(double theta) {
00053         this.theta = theta;
00054     }
00055 
00056     @Override
00057     public boolean equals(Object o) {
00058         if (this == o) return true;
00059         if (o == null || getClass() != o.getClass()) return false;
00060 
00061         DataPoint dataPoint = (DataPoint) o;
00062 
00063         if (Double.compare(dataPoint.theta, theta) != 0) return false;
00064         if (Double.compare(dataPoint.x, x) != 0) return false;
00065         if (Double.compare(dataPoint.y, y) != 0) return false;
00066         if (Double.compare(dataPoint.z, z) != 0) return false;
00067 
00068         return true;
00069     }
00070 
00071     @Override
00072     public int hashCode() {
00073         int result;
00074         long temp;
00075         temp = Double.doubleToLongBits(x);
00076         result = (int) (temp ^ (temp >>> 32));
00077         temp = Double.doubleToLongBits(y);
00078         result = 31 * result + (int) (temp ^ (temp >>> 32));
00079         temp = Double.doubleToLongBits(z);
00080         result = 31 * result + (int) (temp ^ (temp >>> 32));
00081         temp = Double.doubleToLongBits(theta);
00082         result = 31 * result + (int) (temp ^ (temp >>> 32));
00083         return result;
00084     }
00085 }


jinteractiveworld
Author(s): Russell Toris
autogenerated on Sun Dec 14 2014 11:27:03