de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class DoubleParameter

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<Number,T>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.NumberParameter<Double>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DoubleParameter

public class DoubleParameter
extends NumberParameter<Double>

Parameter class for a parameter specifying a double value.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleParameter

public DoubleParameter(OptionID optionID,
                       List<ParameterConstraint<Number>> cons,
                       Double defaultValue)
Constructs a double parameter with the given optionID, parameter constraints, and default value.

Parameters:
optionID - the unique optionID
cons - a list of parameter constraints for this double parameter
defaultValue - the default value for this double parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       List<ParameterConstraint<Number>> cons,
                       boolean optional)
Constructs a double parameter with the given optionID, parameter constraints, and optional flag.

Parameters:
optionID - the unique optionID
cons - a list of parameter constraints for this double parameter
optional - specifies whether this parameter is an optional parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       List<ParameterConstraint<Number>> constraints)
Constructs a double parameter with the given optionID, and parameter constraints.

Parameters:
optionID - the unique optionID
constraints - a list of parameter constraints for this double parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       ParameterConstraint<Number> constraint,
                       Double defaultValue)
Constructs a double parameter with the given optionID, parameter constraint, and default value.

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter
defaultValue - the default value for this parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       ParameterConstraint<Number> constraint,
                       boolean optional)
Constructs a double parameter with the given optionID, parameter constraint, and optional flag.

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter
optional - specifies whether this parameter is an optional parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       ParameterConstraint<Number> constraint)
Constructs a double parameter with the given optionID, and parameter constraint.

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       Double defaultValue)
Constructs a double parameter with the given optionID and default value.

Parameters:
optionID - the unique optionID
defaultValue - the default value for this double parameter

DoubleParameter

public DoubleParameter(OptionID optionID,
                       boolean optional)
Constructs a double parameter with the given optionID and optional flag.

Parameters:
optionID - the unique id of this parameter
optional - specifies whether this parameter is an optional parameter

DoubleParameter

public DoubleParameter(OptionID optionID)
Constructs a double parameter with the given optionID.

Parameters:
optionID - the unique id of this parameter
Method Detail

getValueAsString

public String getValueAsString()
Get the value as string. May return null

Specified by:
getValueAsString in class Parameter<Number,Double>
Returns:
Value as string

parseValue

protected Double parseValue(Object obj)
                     throws WrongParameterValueException
Parse a given value into the destination type.

Specified by:
parseValue in class Parameter<Number,Double>
Parameters:
obj - Object to parse (may be a string representation!)
Returns:
Parsed object
Throws:
WrongParameterValueException

getSyntax

public String getSyntax()
Returns a string representation of the parameter's type.

Specified by:
getSyntax in class Parameter<Number,Double>
Returns:
"<double>"

Release 0.4.0 (2011-09-20_1324)