001package ca.bc.webarts.widgets;
002
003/**
004 * A class that encapsulates a value and its error.
005 * Primarily for use with ScientificFormat
006 * @see jas.util.ScientificFormat
007 */
008public class DoubleWithError
009{
010    public DoubleWithError(double value, double error)
011    {
012        this.value = value;
013        this.error = error;
014    }
015    public void setError(double error)
016    {
017        this.error = error;
018    }
019    public double getError()
020    {
021        return error;
022    }
023    public void setValue(double value)
024    {
025        this.value = value;
026    }
027    public double getValue()
028    {
029        return value;
030    }
031    public String toString()
032    {
033        return String.valueOf(value)+plusorminus+error;
034    }
035   public final static String plusorminus = "\u00b1";
036    private double value, error;
037}