public class DoubleParameter extends NumberParameter<Double>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
DoubleParameter(OptionID optionID)
Constructs a double parameter with the given optionID.
|
DoubleParameter(OptionID optionID,
boolean optional)
Constructs a double parameter with the given optionID and optional flag.
|
DoubleParameter(OptionID optionID,
Double defaultValue)
Constructs a double parameter with the given optionID and default value.
|
DoubleParameter(OptionID optionID,
List<ParameterConstraint<Number>> constraints)
Constructs a double parameter with the given optionID, and parameter
constraints.
|
DoubleParameter(OptionID optionID,
List<ParameterConstraint<Number>> cons,
boolean optional)
Constructs a double parameter with the given optionID, parameter
constraints, and optional flag.
|
DoubleParameter(OptionID optionID,
List<ParameterConstraint<Number>> cons,
Double defaultValue)
Constructs a double parameter with the given optionID, parameter
constraints, and default value.
|
DoubleParameter(OptionID optionID,
ParameterConstraint<Number> constraint)
Constructs a double parameter with the given optionID, and parameter
constraint.
|
DoubleParameter(OptionID optionID,
ParameterConstraint<Number> constraint,
boolean optional)
Constructs a double parameter with the given optionID, parameter
constraint, and optional flag.
|
DoubleParameter(OptionID optionID,
ParameterConstraint<Number> constraint,
Double defaultValue)
Constructs a double parameter with the given optionID, parameter
constraint, and default value.
|
Modifier and Type | Method and Description |
---|---|
String |
getSyntax()
Returns a string representation of the parameter's type.
|
String |
getValueAsString()
Get the value as string.
|
protected Double |
parseValue(Object obj)
Parse a given value into the destination type.
|
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
public DoubleParameter(OptionID optionID, List<ParameterConstraint<Number>> cons, Double defaultValue)
optionID
- the unique optionIDcons
- a list of parameter constraints for this double parameterdefaultValue
- the default value for this double parameterpublic DoubleParameter(OptionID optionID, List<ParameterConstraint<Number>> cons, boolean optional)
optionID
- the unique optionIDcons
- a list of parameter constraints for this double parameteroptional
- specifies whether this parameter is an optional parameterpublic DoubleParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints)
optionID
- the unique optionIDconstraints
- a list of parameter constraints for this double
parameterpublic DoubleParameter(OptionID optionID, ParameterConstraint<Number> constraint, Double defaultValue)
optionID
- the unique id of this parameterconstraint
- the constraint of this parameterdefaultValue
- the default value for this parameterpublic DoubleParameter(OptionID optionID, ParameterConstraint<Number> constraint, boolean optional)
optionID
- the unique id of this parameterconstraint
- the constraint of this parameteroptional
- specifies whether this parameter is an optional parameterpublic DoubleParameter(OptionID optionID, ParameterConstraint<Number> constraint)
optionID
- the unique id of this parameterconstraint
- the constraint of this parameterpublic DoubleParameter(OptionID optionID, Double defaultValue)
optionID
- the unique optionIDdefaultValue
- the default value for this double parameterpublic DoubleParameter(OptionID optionID, boolean optional)
optionID
- the unique id of this parameteroptional
- specifies whether this parameter is an optional parameterpublic DoubleParameter(OptionID optionID)
optionID
- the unique id of this parameterpublic String getValueAsString()
null
getValueAsString
in class Parameter<Number,Double>
protected Double parseValue(Object obj) throws WrongParameterValueException
parseValue
in class Parameter<Number,Double>
obj
- Object to parse (may be a string representation!)WrongParameterValueException