public class IntegerParameterType extends ParameterType<Integer>
lower limit
and an upper limit
for the range of
allowed values.Modifier and Type | Field and Description |
---|---|
private Integer |
lowerLimit
The lower limit of the parameter.
|
private Integer |
upperLimit
The upper limit of the parameter.
|
Constructor and Description |
---|
IntegerParameterType()
Create a new integer parameter type, without any limits and allowing null
values.
|
IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull)
Create a new integer parameter type.
|
IntegerParameterType(Integer lowerLimit,
Integer upperLimit,
Integer defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Integer> items) |
Modifier and Type | Method and Description |
---|---|
Integer |
getLowerLimit()
Get the lowest valid value of the parameter.
|
Integer |
getUpperLimit()
Get the highest valid value of the parameter.
|
(package private) IntegerParameterValueData |
newParameterValueData()
Create a new
IntegerParameterValueData object. |
String |
toString() |
(package private) void |
validateValue(String name,
Integer value)
Checks if the value is within the range given by the upper and lower
limits if those are given.
|
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, isMasked, validate, validate
private final Integer lowerLimit
private final Integer upperLimit
public IntegerParameterType()
public IntegerParameterType(Integer lowerLimit, Integer upperLimit, Integer defaultValue, boolean notNull)
lowerLimit
- The lowest allowed value, or null to have no limitupperLimit
- The highest allowed value, or null to have no limitdefaultValue
- The default value for this parameternotNull
- FALSE if nulls values are allowed, TRUE otherwisevoid validateValue(String name, Integer value) throws InvalidDataException
validateValue
in class ParameterType<Integer>
value
- The value to testname
- The name of the parameter, use the name if there is need to
throw an exceptionInvalidDataException
- If the value is outside the range of allowed valuesIntegerParameterValueData newParameterValueData()
IntegerParameterValueData
object.newParameterValueData
in class ParameterType<Integer>
public Integer getLowerLimit()
public Integer getUpperLimit()