@Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Point2D))
            return false;
        if (obj == this)
            return true;

        if ((((Point2D) obj).getX() == getX()) && ((Point2D) obj).getY() == getY()) {
            return true;
        }

        return false;

    }