|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jwarp.service.param.AValidator
|
+--org.jwarp.service.param.NumberValidator
A validator for numbers with range check.
| Field Summary | |
(package private) double |
dmax
Maximal accepted double value |
(package private) double |
dmin
Minimal accepted double value |
(package private) long |
lmax
Maximal accepted long value |
(package private) long |
lmin
Minimal accepted long value |
(package private) short |
type
|
static short |
TYPE_FLOAT
Number type: floating point numbers (doubles). |
static short |
TYPE_INT
Number type: integral numbers (longs). |
static short |
TYPE_UNDEFINED
Number type: undefined state. |
| Fields inherited from class org.jwarp.service.param.AValidator |
contentValidator, mayBeEmpty, required |
| Constructor Summary | |
NumberValidator()
|
|
NumberValidator(double min)
A Constructor: sets min. |
|
NumberValidator(double min,
double max)
A Constructor: sets min and max. |
|
NumberValidator(float min)
A Constructor: sets min. |
|
NumberValidator(int min)
A Constructor: sets min. |
|
NumberValidator(long min)
A Constructor: sets min. |
|
NumberValidator(long min,
long max)
A Constructor: sets min and max. |
|
NumberValidator(short min)
A Constructor: sets min. |
|
| Method Summary | |
void |
configure(org.jdom.Element config)
Pass the Configuration to the Configurable
class. |
double |
getMaxFloat()
Get the upper limit of the range |
long |
getMaxInt()
Get the upper limit of the range |
double |
getMinFloat()
Get the lower limit of the range |
long |
getMinInt()
Get the lower limit of the range |
java.lang.String |
getValidationClass()
Returns the class name of the class being validated. |
short |
getValidationType()
Returns the current validation type. |
void |
setMax(double max)
Sets the upper limit of the range |
void |
setMax(long max)
Sets the upper limit of the range |
void |
setMin(double min)
Set the lower limit of the range |
void |
setMin(long min)
Set the lower limit of the range |
void |
validate(java.lang.Object value)
The validate function Checks for a float in the given range |
| Methods inherited from class org.jwarp.service.param.AValidator |
getMayBeEmpty, getNextValidator, getRequired, setMayBeEmpty, setNextValidator, setRequired |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final short TYPE_UNDEFINED
public static final short TYPE_INT
public static final short TYPE_FLOAT
double dmin
double dmax
long lmin
long lmax
short type
| Constructor Detail |
public NumberValidator()
public NumberValidator(double min,
double max)
min - Minimal valuemax - Maximal value
public NumberValidator(long min,
long max)
min - Minimal valuemax - Maximal valuepublic NumberValidator(double min)
min - Minimal valuepublic NumberValidator(float min)
min - Minimal valuepublic NumberValidator(long min)
min - Minimal valuepublic NumberValidator(int min)
min - Minimal valuepublic NumberValidator(short min)
min - Minimal value| Method Detail |
public void configure(org.jdom.Element config)
throws ConfigurationException
IConfigurableConfiguration to the Configurable
class. This method must always be called after the constructor and before any other method.org.jwarp.service.configuration.IConfigurableconfiguration - the class configurations.
public void validate(java.lang.Object value)
throws ParameterException
validate in class AValidatorcontens - The paramter content to be checkedpublic void setMin(long min)
The - new lower limitpublic void setMax(long max)
max - The new upper limitpublic long getMinInt()
public long getMaxInt()
public void setMin(double min)
The - new lower limitpublic void setMax(double max)
max - The new upper limitpublic double getMinFloat()
public double getMaxFloat()
public java.lang.String getValidationClass()
public short getValidationType()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||