package framework.parameters;

import java.util.Observer;

import framework.parameters.Parameter;

/**
 * Class that represents a Parameter of Double type.
 */
public class DoubleParameter extends Parameter<Double> {
    /**
     * Create a DoubleParameter object.
     * @param  o   the observer of the Parameter
     * @param  n   the name of the parameter
     * @param  v   the initial value of the parameter
     * @param  min the minimal value of the parameter
     * @param  max the maximal value of the parameter
     */
    public DoubleParameter(Observer o, String n, Double v, Double min, Double max) {
        super(o, n, v);
        minValue = min;
        maxValue = max;
    }

    public Double parseValue(Double v) {
        if(v <= maxValue && v >= minValue)
            return v;
        return null;
    }

    public Double parseValue(String s) {
        try {
            return parseValue(Double.parseDouble(s));
        } catch(NullPointerException|NumberFormatException e) {
            return null;
        }
    }

    private Double maxValue;
    private Double minValue;
}
@@ -678,32 +678,121 @@
 e = max;%0A    %7D%0A%0A
+    /**%0A     * @postcondition returnValue %3C= maxValue && returnValue %3E= minValue%0A     */%0A
     public Doubl
@@ -905,24 +905,113 @@
 ull;%0A    %7D%0A%0A
+    /**%0A     * @postcondition returnValue %3C= maxValue && returnValue %3E= minValue%0A     */%0A
     public D

Add postcondition to parseValue in DoubleParameter.