Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.utilities.optionhandling
Class NumberParameter<T extends Number>

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<T>
Type Parameters:
T - the type of a possible value (i.e., the type of the option)
Direct Known Subclasses:
DoubleParameter, IntParameter, LongParameter

public abstract class NumberParameter<T extends Number>
extends Parameter<T,Number>

Abstract class for defining a number parameter.

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
NumberParameter(OptionID optionID)
          Constructs a number parameter with the given optionID.
NumberParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints)
          Constructs a number parameter with the given optionID, and constraint.
NumberParameter(OptionID optionID, ParameterConstraint<Number> constraint)
          Constructs a number parameter with the given optionID, and constraint.
NumberParameter(OptionID optionID, ParameterConstraint<Number> constraint, boolean optional, T defaultValue)
          Constructs a number parameter with the given optionID, constraint, and optional flag.
 
Method Summary
 T getNumberValue()
          Returns the number value of the parameter.
 
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, getSyntax, isValid, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberParameter

public NumberParameter(OptionID optionID)
Constructs a number parameter with the given optionID.

Parameters:
optionID - the unique id of this parameter

NumberParameter

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

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

NumberParameter

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

Parameters:
optionID - the unique id of this parameter
constraints - the constraints of this parameter, may be empty if there are no constraints

NumberParameter

public NumberParameter(OptionID optionID,
                       ParameterConstraint<Number> constraint,
                       boolean optional,
                       T defaultValue)
Constructs a number parameter with the given optionID, constraint, and optional flag.

Parameters:
optionID - the unique id of this parameter
constraint - the constraint of this parameter
optional - specifies if this parameter is an optional parameter
defaultValue - the default value for this parameter
Method Detail

getNumberValue

public T getNumberValue()
Returns the number value of the parameter.

Returns:
number value of the parameter.

Release 0.2.1 (2009-07-13_1605)