public class LongParameterType extends ParameterType<Long>
lower limit
and an upper limit
for the range of
allowed values.Modifier and Type | Field and Description |
---|---|
private Long |
lowerLimit
The lower limit of the parameter.
|
private Long |
upperLimit
The upper limit of the parameter.
|
Constructor and Description |
---|
LongParameterType()
Create a new long parameter type, without any limits and allowing null
values.
|
LongParameterType(Long lowerLimit,
Long upperLimit,
Long defaultValue,
boolean notNull)
Create a new long parameter type.
|
LongParameterType(Long lowerLimit,
Long upperLimit,
Long defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Long> items) |
Modifier and Type | Method and Description |
---|---|
Long |
getLowerLimit()
Get the lowest valid value of the parameter.
|
Long |
getUpperLimit()
Get the highest valid value of the parameter.
|
(package private) LongParameterValueData |
newParameterValueData()
Create a new
LongParameterValueData object. |
String |
toString() |
(package private) void |
validateValue(String name,
Long 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 Long lowerLimit
private final Long upperLimit
public LongParameterType()
public LongParameterType(Long lowerLimit, Long upperLimit, Long defaultValue, boolean notNull)
lowerLimit
- The lowest allowed value, or null to have no limitupperLimit
- The highest allowed value, or null to have no limitdefaultValue
- Default value for the parameter.notNull
- FALSE if nulls values are allowed, TRUE otherwisevoid validateValue(String name, Long value) throws InvalidDataException
validateValue
in class ParameterType<Long>
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 valuesLongParameterValueData newParameterValueData()
LongParameterValueData
object.newParameterValueData
in class ParameterType<Long>
public Long getLowerLimit()
public Long getUpperLimit()