public Object clone() { try { SensorPoint sp = new SensorPoint(this.id); for (Value v : this.measures) { sp.addMeasure((Value) v.clone()); } return sp; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); e.getStackTrace(); } return null; }
@Override public int compareTo(SensorPoint sp) { if (this.getId() < sp.getId()) return -1; else if (this.getId() > sp.getId()) return 1; else return 0; }