de.lmu.ifi.dbs.elki.utilities.optionhandling
Class NumberParameter<T extends Number>
java.lang.Object
de.lmu.ifi.dbs.elki.utilities.optionhandling.Option<T>
de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameter<T,Number>
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 parameterconstraint
- 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 parameterconstraints
- 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 parameterconstraint
- the constraint of this parameteroptional
- specifies if this parameter is an optional parameterdefaultValue
- the default value for this parameter
getNumberValue
public T getNumberValue()
- Returns the number value of the parameter.
- Returns:
- number value of the parameter.