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