public boolean isComparable(Object a){ if (a==null) return false; else { try{ Point2D p = (Point2D) a; } catch (ClassCastException e) { return false; } return true; } } }