Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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

public class DoubleParameter
extends NumberParameter<Double>

Parameter class for a parameter specifying a double value.

Author:
Steffi Wanka

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter
constraints, defaultValue, optionalParameter
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
optionid, shortDescription, value
 
Constructor Summary
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.
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
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 String getSyntax()
          Returns a string representation of the parameter's type.
 boolean isValid(String value)
          Checks if the given argument is valid for this option.
 void setValue(String value)
          Sets the value of the option.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.NumberParameter
getNumberValue
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter
addConstraint, addConstraintList, getDefaultValue, getFullDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isOptional, isSet, reset, setDefaultValue, setDefaultValueToValue, setOptional, tookDefaultValue
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
getName, getOptionID, getShortDescription, setShortDescription
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleParameter

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

Parameters:
optionID - the unique id of this 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,
                       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,
                       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,
                       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,
                       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>> 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,
                       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
Method Detail

setValue

public void setValue(String value)
              throws ParameterException
Description copied from class: Option
Sets the value of the option.

Specified by:
setValue in class Option<Double>
Parameters:
value - the option's value to be set
Throws:
ParameterException - if the given value is not a valid value for this option.

isValid

public boolean isValid(String value)
                throws ParameterException
Description copied from class: Option
Checks if the given argument is valid for this option.

Specified by:
isValid in class Option<Double>
Parameters:
value - option value to be checked
Returns:
true, if the given value is valid for this option
Throws:
ParameterException - if the given value is not a valid value for this option.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this double parameter has the same value as the specified object, false otherwise.

getSyntax

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

Specified by:
getSyntax in class Option<Double>
Returns:
"<double>"

Release 0.2 (2009-07-06_1820)