/** * Set the parameter value as an integer. * * @param value The parameter value. * @throws InvalidParameterValueException if the value is illegal for some reason (for example a * value out of range). */ public void setValue(final int value) throws InvalidParameterValueException { setValue((double) value); }
/** * Set the parameter value as a boolean. * * @param value The parameter value. * @throws InvalidParameterValueException if the boolean type is inappropriate for this * parameter. */ public void setValue(final boolean value) throws InvalidParameterValueException { setValue(value ? 1.0 : 0.0); }
/** * Constructs a parameter from the specified descriptor and value. This convenience constructor * is equivalents to the one-argument constructor followed by a call to {@link * #setValue(double)}. * * @param descriptor The abstract definition of this parameter. * @param value The parameter value. * @throws IllegalArgumentException if the value class is not {@code Double.class}. */ public FloatParameter(final ParameterDescriptor<Double> descriptor, final double value) { this(descriptor); setValue(value); }