Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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<Long>
              extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.LongParameter

public class LongParameter
extends NumberParameter<Long>

Parameter class for a parameter specifying a long 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
LongParameter(OptionID optionID)
          Constructs a long parameter with the given optionID.
LongParameter(OptionID optionID, boolean optional, long defaultValue)
          Constructs a long parameter with the given optionID, parameter constraint and default value.
LongParameter(OptionID optionID, ParameterConstraint<Number> constraint)
          Constructs a long parameter with the given optionID, and parameter constraint.
LongParameter(OptionID optionID, ParameterConstraint<Number> constraint, long defaultValue)
          Constructs a long parameter with the given optionID, parameter constraint and default value.
 
Method Summary
 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongParameter

public LongParameter(OptionID optionID)
Constructs a long parameter with the given optionID.

Parameters:
optionID - the unique OptionID for this parameter

LongParameter

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

Parameters:
optionID - the unique OptionID for this parameter
constraint - the parameter constraint for this long parameter

LongParameter

public LongParameter(OptionID optionID,
                     ParameterConstraint<Number> constraint,
                     long defaultValue)
Constructs a long parameter with the given optionID, parameter constraint and default value.

Parameters:
optionID - the unique OptionID for this parameter
constraint - the parameter constraint for this long parameter
defaultValue - the default value

LongParameter

public LongParameter(OptionID optionID,
                     boolean optional,
                     long defaultValue)
Constructs a long parameter with the given optionID, parameter constraint and default value.

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

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<Long>
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.

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<Long>
Parameters:
value - the option's value to be set
Throws:
ParameterException - if the given value is not a valid value for this option.

getSyntax

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

Specified by:
getSyntax in class Option<Long>
Returns:
"<long>"

Release 0.2.1 (2009-07-13_1605)