public class DoubleParameter extends NumberParameter<DoubleParameter,java.lang.Double>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
DoubleParameter(OptionID optionID)
Constructs a double parameter with the given optionID.
|
DoubleParameter(OptionID optionID,
double defaultValue)
Constructs a double parameter with the given optionID and default value.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleValue()
Get the parameter value as double.
|
java.lang.String |
getSyntax()
Returns a string representation of the parameter's type.
|
java.lang.String |
getValueAsString()
Get the value as string.
|
protected java.lang.Double |
parseValue(java.lang.Object obj)
Parse a given value into the destination type.
|
addConstraint, describeValues, getConstraints, getDefaultValue, getDefaultValueAsString, getOptionID, getShortDescription, getValue, hasDefaultValue, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, validate
public DoubleParameter(OptionID optionID, double defaultValue)
optionID
- the unique optionIDdefaultValue
- the default value for this double parameterpublic DoubleParameter(OptionID optionID)
optionID
- the unique id of this parameterpublic java.lang.String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<java.lang.Double>
getValueAsString
in class AbstractParameter<DoubleParameter,java.lang.Double>
protected java.lang.Double parseValue(java.lang.Object obj) throws WrongParameterValueException
AbstractParameter
parseValue
in class AbstractParameter<DoubleParameter,java.lang.Double>
obj
- Object to parse (may be a string representation!)WrongParameterValueException
public java.lang.String getSyntax()
getSyntax
in interface Parameter<java.lang.Double>
getSyntax
in class AbstractParameter<DoubleParameter,java.lang.Double>
public double doubleValue()
Copyright © 2019 ELKI Development Team. License information.