@Override public int compareTo(DistanceEntry<E> o){
  int comp=Double.compare(distance,o.distance);
  if (comp != 0) {
    return comp;
  }
  return 0;
}

@ Override public int compareTo ( DistanceEntry < E > o ) { int comp = Double . compare ( distance , o . distance ) ; if ( comp != 0 ) { return comp ; } return 0 ; }
compares this object with the specified object for order .
