|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.ParameterType<Double>
net.sf.basedb.core.DoubleParameterType
public class DoubleParameterType
This class represent a parameter type that is a double.
This type defines a lower limit
and an upper limit for the range of
allowed values.
| Field Summary | |
|---|---|
private Double |
lowerLimit
The lower limit of the parameter. |
private Double |
upperLimit
The upper limit of the parameter. |
| Constructor Summary | |
|---|---|
DoubleParameterType()
Create a new double parameter type, without any limits and allowing null values. |
|
DoubleParameterType(Double lowerLimit,
Double upperLimit,
Double defaultValue,
boolean notNull)
Create a new double parameter type. |
|
DoubleParameterType(Double lowerLimit,
Double upperLimit,
Double defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<Double> items)
Create a new double parameter type with a list of allowed values. |
|
| Method Summary | |
|---|---|
Double |
getLowerLimit()
Get the lowst valid value of the parameter. |
Double |
getUpperLimit()
Get the highest valid value of the parameter. |
(package private) DoubleParameterValueData |
newParameterValueData()
Create a new DoubleParameterValueData object. |
String |
toString()
|
(package private) void |
validateValue(String name,
Double value)
Checks if the value is within the range given by the upper and lower limits if those are given. |
| Methods inherited from class net.sf.basedb.core.ParameterType |
|---|
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, validate, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Double lowerLimit
private final Double upperLimit
| Constructor Detail |
|---|
public DoubleParameterType()
public DoubleParameterType(Double lowerLimit,
Double upperLimit,
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 otherwise
public DoubleParameterType(Double lowerLimit,
Double upperLimit,
Double defaultValue,
boolean notNull,
int multiplicity,
int width,
int height,
List<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..| Method Detail |
|---|
public String toString()
toString in class Object
void validateValue(String name,
Double value)
throws InvalidDataException
validateValue in class ParameterType<Double>value - The value to testname - The name of the parameter, use the name if there is need to
throw an exception
InvalidDataException - If the value is outside
the range of allowed valuesDoubleParameterValueData newParameterValueData()
DoubleParameterValueData object.
newParameterValueData in class ParameterType<Double>public Double getLowerLimit()
public Double getUpperLimit()
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||