public class IntParameter extends NumberParameter<Integer>
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
public IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, Integer defaultValue)
optionID
- optionID the unique id of the optionconstraints
- the constraint for this integer parameterdefaultValue
- the default valuepublic IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints, boolean optional)
optionID
- optionID the unique id of the optionconstraints
- the constraint for this integer parameteroptional
- specifies if this parameter is an optional parameterpublic IntParameter(OptionID optionID, List<ParameterConstraint<Number>> constraints)
optionID
- optionID the unique id of the optionconstraints
- the constraint for this integer parameterpublic IntParameter(OptionID optionID, ParameterConstraint<Number> constraint, Integer defaultValue)
optionID
- optionID the unique id of the optionconstraint
- the constraint for this integer parameterdefaultValue
- the default valuepublic IntParameter(OptionID optionID, ParameterConstraint<Number> constraint, boolean optional)
optionID
- optionID the unique id of the optionconstraint
- the constraint for this integer parameteroptional
- specifies if this parameter is an optional parameterpublic IntParameter(OptionID optionID, ParameterConstraint<Number> constraint)
optionID
- optionID the unique id of the optionconstraint
- the constraint for this integer parameterpublic IntParameter(OptionID optionID, Integer defaultValue)
optionID
- optionID the unique id of the optiondefaultValue
- the default valuepublic IntParameter(OptionID optionID, boolean optional)
optionID
- optionID the unique id of the optionoptional
- specifies if this parameter is an optional parameterpublic IntParameter(OptionID optionID)
optionID
- optionID the unique id of the optionpublic String getValueAsString()
null
getValueAsString
in class Parameter<Number,Integer>
protected Integer parseValue(Object obj) throws ParameterException
parseValue
in class Parameter<Number,Integer>
obj
- Object to parse (may be a string representation!)ParameterException
- when the object cannot be parsed.