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

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

public class LongParameter
extends NumberParameter<Long>

Parameter class for a parameter specifying a long value.


Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
LongParameter(OptionID optionID)
          Constructs a long parameter with the given optionID.
LongParameter(OptionID optionID, boolean optional)
          Constructs a long parameter with the given optionID.
LongParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints)
          Constructs a long parameter with the given optionID, and parameter constraint.
LongParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, boolean optional)
          Constructs a long parameter with the given optionID, and parameter constraint.
LongParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, long defaultValue)
          Constructs a long parameter with the given optionID, parameter constraint and default value.
LongParameter(OptionID optionID, long defaultValue)
          Constructs a long parameter with the given optionID 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, boolean optional)
          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.
 String getValueAsString()
          Get the value as string.
protected  Long 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

LongParameter

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

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

LongParameter

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

Parameters:
optionID - the unique OptionID for this parameter
constraints - the parameter constraints for this long parameter
optional - optional flag

LongParameter

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

Parameters:
optionID - the unique OptionID for this parameter
constraints - the parameter constraints 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,
                     ParameterConstraint<Number> constraint,
                     boolean optional)
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
optional - optional flag

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,
                     long defaultValue)
Constructs a long parameter with the given optionID and default value.

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

LongParameter

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

Parameters:
optionID - the unique OptionID for this parameter
optional - optional flag

LongParameter

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

Parameters:
optionID - the unique OptionID for this parameter
Method Detail

getValueAsString

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

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

parseValue

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

Specified by:
parseValue in class Parameter<Number,Long>
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,Long>
Returns:
"<long>"

Release 0.4.0 (2011-09-20_1324)