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

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<Integer>
          extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter

public class IntParameter
extends NumberParameter<Integer>

Parameter class for a parameter specifying an integer value.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
IntParameter(OptionID optionID)
          Constructs an integer parameter with the given optionID.
IntParameter(OptionID optionID, boolean optional)
          Constructs an integer parameter with the given optionID.
IntParameter(OptionID optionID, Integer defaultValue)
          Constructs an integer parameter with the given optionID.
IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints)
          Constructs an integer parameter with the given optionID, and parameter constraint.
IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, boolean optional)
          Constructs an integer parameter with the given optionID, parameter constraint, and optional flag.
IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, Integer defaultValue)
          Constructs an integer parameter with the given optionID, parameter constraint, and default value.
IntParameter(OptionID optionID, ParameterConstraint<Number> constraint)
          Constructs an integer parameter with the given optionID, and parameter constraint.
IntParameter(OptionID optionID, ParameterConstraint<Number> constraint, boolean optional)
          Constructs an integer parameter with the given optionID, parameter constraint, and optional flag.
IntParameter(OptionID optionID, ParameterConstraint<Number> constraint, Integer defaultValue)
          Constructs an integer 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  Integer 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

IntParameter

public IntParameter(OptionID optionID,
                    List<ParameterConstraint<Number>> constraints,
                    Integer defaultValue)
Constructs an integer parameter with the given optionID, parameter constraint, and default value.

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

IntParameter

public IntParameter(OptionID optionID,
                    List<ParameterConstraint<Number>> constraints,
                    boolean optional)
Constructs an integer parameter with the given optionID, parameter constraint, and optional flag.

Parameters:
optionID - optionID the unique id of the option
constraints - the constraint for this integer parameter
optional - specifies if this parameter is an optional parameter

IntParameter

public IntParameter(OptionID optionID,
                    List<ParameterConstraint<Number>> constraints)
Constructs an integer parameter with the given optionID, and parameter constraint.

Parameters:
optionID - optionID the unique id of the option
constraints - the constraint for this integer parameter

IntParameter

public IntParameter(OptionID optionID,
                    ParameterConstraint<Number> constraint,
                    Integer defaultValue)
Constructs an integer parameter with the given optionID, parameter constraint, and default value.

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

IntParameter

public IntParameter(OptionID optionID,
                    ParameterConstraint<Number> constraint,
                    boolean optional)
Constructs an integer parameter with the given optionID, parameter constraint, and optional flag.

Parameters:
optionID - optionID the unique id of the option
constraint - the constraint for this integer parameter
optional - specifies if this parameter is an optional parameter

IntParameter

public IntParameter(OptionID optionID,
                    ParameterConstraint<Number> constraint)
Constructs an integer parameter with the given optionID, and parameter constraint.

Parameters:
optionID - optionID the unique id of the option
constraint - the constraint for this integer parameter

IntParameter

public IntParameter(OptionID optionID,
                    Integer defaultValue)
Constructs an integer parameter with the given optionID.

Parameters:
optionID - optionID the unique id of the option
defaultValue - the default value

IntParameter

public IntParameter(OptionID optionID,
                    boolean optional)
Constructs an integer parameter with the given optionID.

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

IntParameter

public IntParameter(OptionID optionID)
Constructs an integer parameter with the given optionID.

Parameters:
optionID - optionID the unique id of the option
Method Detail

getValueAsString

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

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

parseValue

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

Specified by:
parseValue in class Parameter<Number,Integer>
Parameters:
obj - Object to parse (may be a string representation!)
Returns:
Parsed object
Throws:
ParameterException - when the object cannot be parsed.

getSyntax

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

Specified by:
getSyntax in class Parameter<Number,Integer>
Returns:
"<int>"

Release 0.4.0 (2011-09-20_1324)