/*
 * OrderedPair.java
 *
 * Created on January 19, 2007, 4:16 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package usda.weru.erosion.barriereditor;

/**
 *
 * @author wjr
 */
public class OrderedPair {
    
    /** Creates a new instance of OrderedPair */
    public OrderedPair() {
    }
    
    private double x = 0.0;
    private double y = 0.0;

	/**
	 *
	 * @param x
	 * @param y
	 */
	public OrderedPair(double x, double y) {
        this.x = x;
        this.y = y;
    }

	/**
	 *
	 * @param xStr
	 * @param yStr
	 */
	public OrderedPair(String xStr, String yStr) {
        this.x = Double.parseDouble(xStr.trim());
        this.y = Double.parseDouble(yStr.trim());
    }

	/**
	 *
	 * @return
	 */
	public double getX() {
        return x;
    }

	/**
	 *
	 * @return
	 */
	public double getY() {
        return y;
    }

	/**
	 *
	 * @param x
	 */
	public void setX(double x) {
        this.x = x;
    }

	/**
	 *
	 * @param y
	 */
	public void setY(double y) {
        this.y = y;
    }

	/**
	 *
	 * @return
	 */
	@Override
    public String toString() {
        return "" + this.x + ":" + this.y;
    }
}
