package vismon.plot;

public class ContourPixel {

    private double x;
    private double y;

    public ContourPixel(double x, double y) {
        setX(x);
        setY(y);
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    @Override
    public int hashCode() {
        return 13 * Double.valueOf(x).hashCode() + 7 * Double.valueOf(y).hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof ContourPixel))
            return false;
        ContourPixel cp = (ContourPixel)obj;
        return cp.x == x && cp.y == y;
    }

    @Override
    public String toString() {
        return "@(" + x + ", " + y + ")";
    }
}
