boolean (Object obj) { if (obj == this) return true; if (obj == null || obj.getClass() != this.getClass()) return false; Point that = (Point) obj; return Double.doubleToLongBits(this.x) == Double.doubleToLongBits(that.x) && Double.doubleToLongBits(this.y) == Double.doubleToLongBits(that.y); }