D
- Distance typepublic class DistanceParameter<D extends Distance<D>> extends AbstractParameter<D>
Modifier and Type | Field and Description |
---|---|
(package private) D |
dist
Distance type
|
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
DistanceParameter(OptionID optionID,
D dist)
Constructs a double parameter with the given optionID.
|
DistanceParameter(OptionID optionID,
D dist,
boolean optional)
Constructs a double parameter with the given optionID and optional flag.
|
DistanceParameter(OptionID optionID,
D dist,
D defaultValue)
Constructs a double parameter with the given optionID and default value.
|
DistanceParameter(OptionID optionID,
DistanceFunction<?,D> dist)
Constructs a double parameter with the given optionID.
|
DistanceParameter(OptionID optionID,
DistanceFunction<?,D> dist,
boolean optional)
Constructs a double parameter with the given optionID and optional flag.
|
DistanceParameter(OptionID optionID,
DistanceFunction<?,D> dist,
D defaultValue)
Constructs a double parameter with the given optionID 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 D |
parseValue(Object obj)
Parse a given value into the destination type.
|
addConstraint, addConstraints, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
public DistanceParameter(OptionID optionID, D dist, D defaultValue)
optionID
- the unique optionIDdist
- distance factorydefaultValue
- the default value for this double parameterpublic DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, D defaultValue)
optionID
- the unique optionIDdist
- distance factorydefaultValue
- the default value for this double parameterpublic DistanceParameter(OptionID optionID, D dist, boolean optional)
optionID
- the unique id of this parameterdist
- distance factoryoptional
- specifies whether this parameter is an optional parameterpublic DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, boolean optional)
optionID
- the unique id of this parameterdist
- distance factoryoptional
- specifies whether this parameter is an optional parameterpublic DistanceParameter(OptionID optionID, D dist)
optionID
- the unique id of this parameterdist
- distance factorypublic DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist)
optionID
- the unique id of this parameterdist
- distance factorypublic String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<D extends Distance<D>>
getValueAsString
in class AbstractParameter<D extends Distance<D>>
protected D parseValue(Object obj) throws WrongParameterValueException
AbstractParameter
parseValue
in class AbstractParameter<D extends Distance<D>>
obj
- Object to parse (may be a string representation!)WrongParameterValueException