public class DoubleParameterType extends ParameterType<java.lang.Double>
lower limit
and an upper limit
for the range of
allowed values.Modifier and Type | Field and Description |
---|---|
private java.lang.Double |
lowerLimit
The lower limit of the parameter.
|
private java.lang.Double |
upperLimit
The upper limit of the parameter.
|
Constructor and Description |
---|
DoubleParameterType()
Create a new double parameter type, without any limits and allowing null
values.
|
DoubleParameterType(java.lang.Double lowerLimit,
java.lang.Double upperLimit,
java.lang.Double defaultValue,
boolean notNull)
Create a new double parameter type.
|
DoubleParameterType(java.lang.Double lowerLimit,
java.lang.Double upperLimit,
java.lang.Double defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
java.util.List<java.lang.Double> items)
Create a new double parameter type with a list of allowed values.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
getLowerLimit()
Get the lowst valid value of the parameter.
|
java.lang.Double |
getUpperLimit()
Get the highest valid value of the parameter.
|
(package private) DoubleParameterValueData |
newParameterValueData()
Create a new
DoubleParameterValueData object. |
java.lang.String |
toString() |
(package private) void |
validateValue(java.lang.String name,
java.lang.Double 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.Double lowerLimit
private final java.lang.Double upperLimit
public DoubleParameterType()
public DoubleParameterType(java.lang.Double lowerLimit, java.lang.Double upperLimit, java.lang.Double 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, or null.notNull
- FALSE if nulls values are allowed, TRUE otherwisepublic DoubleParameterType(java.lang.Double lowerLimit, java.lang.Double upperLimit, java.lang.Double defaultValue, boolean notNull, int multiplicity, int width, int height, java.util.List<java.lang.Double> items)
lowerLimit
- The lowest allowed value, or null to have no limit.upperLimit
- The highest allowed value, or null to have no limit.defaultValue
- The default value of the parameter.notNull
- FALSE if nulls values are allowed, TRUE otherwisemultiplicity
- Number of values that can be tied to this parameter, or null to have no limit.width
- Width of the input field for the parameter in the GUI.height
- Heigth of the input field for the parameter in the GUI.items
- List of allowed values..public java.lang.String toString()
toString
in class java.lang.Object
void validateValue(java.lang.String name, java.lang.Double value) throws InvalidDataException
validateValue
in class ParameterType<java.lang.Double>
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 valuesDoubleParameterValueData newParameterValueData()
DoubleParameterValueData
object.newParameterValueData
in class ParameterType<java.lang.Double>
public java.lang.Double getLowerLimit()
public java.lang.Double getUpperLimit()