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