public class LongParameter extends NumberParameter<LongParameter,java.lang.Long>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
LongParameter(OptionID optionID)
Constructs a long parameter with the given optionID.
|
LongParameter(OptionID optionID,
long defaultValue)
Constructs a long parameter with the given optionID and default value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSyntax()
Returns a string representation of the parameter's type.
|
java.lang.String |
getValueAsString()
Get the value as string.
|
protected java.lang.Long |
parseValue(java.lang.Object obj)
Parse a given value into the destination type.
|
addConstraint, describeValues, getConstraints, getDefaultValue, getDefaultValueAsString, getOptionID, getShortDescription, getValue, hasDefaultValue, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, validate
public LongParameter(OptionID optionID, long defaultValue)
optionID
- the unique OptionID for this parameterdefaultValue
- the default valuepublic LongParameter(OptionID optionID)
optionID
- the unique OptionID for this parameterpublic java.lang.String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<java.lang.Long>
getValueAsString
in class AbstractParameter<LongParameter,java.lang.Long>
protected java.lang.Long parseValue(java.lang.Object obj) throws ParameterException
AbstractParameter
parseValue
in class AbstractParameter<LongParameter,java.lang.Long>
obj
- Object to parse (may be a string representation!)ParameterException
- when the object cannot be parsed.public java.lang.String getSyntax()
getSyntax
in interface Parameter<java.lang.Long>
getSyntax
in class AbstractParameter<LongParameter,java.lang.Long>
Copyright © 2019 ELKI Development Team. License information.