Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      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<Integer>
                  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.IntParameter
All Implemented Interfaces:
Loggable

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.Parameter
constraints, defaultValue, optionalParameter
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
name, shortDescription, value
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
IntParameter(OptionID optionID)
          Constructs an integer parameter with the given optionID.
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.
IntParameter(String name, String description)
          Deprecated.  
IntParameter(String name, String description, List<ParameterConstraint<Number>> constraints)
          Deprecated.  
IntParameter(String name, String description, ParameterConstraint<Number> constraint)
          Deprecated.  
IntParameter(String name, String description, ParameterConstraint<Number> constraint, Integer defaultValue)
          Deprecated.  
IntParameter(String name, String description, ParameterConstraint<Number> constraint, Integer defaultValue, boolean optional)
          Deprecated.  
 
Method Summary
protected  String getParameterType()
          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, getDescription, getValue, hasDefaultValue, isOptional, isSet, reset, setDefaultValue, setDefaultValueToValue, setOptional, tookDefaultValue
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option
getName, getShortDescription, setShortDescription
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
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)
Constructs an integer parameter with the given optionID.

Parameters:
optionID - optionID the unique id of the option

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,
                    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,
                    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

@Deprecated
public IntParameter(String name,
                               String description)
Deprecated. 

Constructs an integer parameter with the given name and description.

Parameters:
name - the parameter name
description - the parameter description

IntParameter

@Deprecated
public IntParameter(String name,
                               String description,
                               ParameterConstraint<Number> constraint)
Deprecated. 

Constructs an integer parameter with the given name, description, and parameter constraint.

Parameters:
name - the parameter name
description - the parameter description
constraint - the constraint for this integer parameter

IntParameter

@Deprecated
public IntParameter(String name,
                               String description,
                               ParameterConstraint<Number> constraint,
                               Integer defaultValue)
Deprecated. 

Constructs an integer parameter with the given name, description, parameter constraint, and defualt value.

Parameters:
name - the parameter name
description - the parameter description
constraint - the constraint for this integer parameter
defaultValue - the default value

IntParameter

@Deprecated
public IntParameter(String name,
                               String description,
                               ParameterConstraint<Number> constraint,
                               Integer defaultValue,
                               boolean optional)
Deprecated. 

Constructs an integer parameter with the given name, description, parameter constraint, and defualt value.

Parameters:
name - the parameter name
description - the parameter description
constraint - the constraint for this integer parameter
defaultValue - the default value
optional - specifies if this parameter is an optional parameter

IntParameter

@Deprecated
public IntParameter(String name,
                               String description,
                               List<ParameterConstraint<Number>> constraints)
Deprecated. 

Constructs an integer parameter with the given name, description, and list of parameter constraints.

Parameters:
name - the parameter name
description - the parameter description
constraints - a list of parameter constraints for this integer 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<Integer>
Parameters:
value - the option's value to be set
Throws:
ParameterException - if the given value is not a valid value for this option.
See Also:
Option.setValue(String)

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<Integer>
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.
See Also:
Option.isValid(java.lang.String)

getParameterType

protected String getParameterType()
Returns a string representation of the parameter's type.

Specified by:
getParameterType in class Parameter<Integer,Number>
Returns:
"<int>"
See Also:
Parameter.getParameterType()

Release 0.1 (2008-07-10_1838)