@Override public int compareTo(SensorPoint sp) { if (this.getId() < sp.getId()) return -1; else if (this.getId() > sp.getId()) return 1; else return 0; }