public class IntegerParameterType extends ParameterType<java.lang.Integer>
lower limit
and an upper limit
for the range of
allowed values.Modifier and Type | Field and Description |
---|---|
private java.lang.Integer |
lowerLimit
The lower limit of the parameter.
|
private java.lang.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(java.lang.Integer lowerLimit,
java.lang.Integer upperLimit,
java.lang.Integer defaultValue,
boolean notNull)
Create a new integer parameter type.
|
IntegerParameterType(java.lang.Integer lowerLimit,
java.lang.Integer upperLimit,
java.lang.Integer defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
java.util.List<java.lang.Integer> items) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getLowerLimit()
Get the lowest valid value of the parameter.
|
java.lang.Integer |
getUpperLimit()
Get the highest valid value of the parameter.
|
(package private) IntegerParameterValueData |
newParameterValueData()
Create a new
IntegerParameterValueData object. |
java.lang.String |
toString() |
(package private) void |
validateValue(java.lang.String name,
java.lang.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 java.lang.Integer lowerLimit
private final java.lang.Integer upperLimit
public IntegerParameterType()
public IntegerParameterType(java.lang.Integer lowerLimit, java.lang.Integer upperLimit, java.lang.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 otherwisepublic IntegerParameterType(java.lang.Integer lowerLimit, java.lang.Integer upperLimit, java.lang.Integer defaultValue, boolean notNull, int multiplicity, int width, int height, java.util.List<java.lang.Integer> items)
public java.lang.String toString()
toString
in class java.lang.Object
void validateValue(java.lang.String name, java.lang.Integer value) throws InvalidDataException
validateValue
in class ParameterType<java.lang.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<java.lang.Integer>
public java.lang.Integer getLowerLimit()
public java.lang.Integer getUpperLimit()