@Override public int compareTo(Object o){
  Outlier outlier=(Outlier)o;
  Point2D p1=getPoint();
  Point2D p2=outlier.getPoint();
  if (p1.equals(p2)) {
    return 0;
  }
 else   if ((p1.getX() < p2.getX()) || (p1.getY() < p2.getY())) {
    return -1;
  }
 else {
    return 1;
  }
}

@ Override public int compareTo ( Object o ) { Outlier outlier = ( Outlier ) o ; Point2D p1 = getPoint ( ) ; Point2D p2 = outlier . getPoint ( ) ; if ( p1 . equals ( p2 ) ) { return 0 ; } else if ( ( p1 . getX ( ) < p2 . getX ( ) ) || ( p1 . getY ( ) < p2 . getY ( ) ) ) { return - 1 ; } else { return 1 ; } }
compares this object with the specified object for order , based on the outlier ' s point .
