|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ParamValidator
A ParamValidator is an interface for parameter type specific value-to-text and text-to-value
conversions, data validation and comparision.
This interface strictly defines algorithms, implementors of this interface should refrain from defining any data
in their implementing classes. Any information required to correctly perform the operations defined in
ParamValidator shall be supplied by the given Parameter.
Parameter validators for a given Java class can be permanently registered in ParamValidator
| Method Summary | |
|---|---|
boolean |
equalValues(Parameter parameter,
Object value1,
Object value2)
Tests if the given two values are equal taking the given parameter information into account. |
String |
format(Parameter parameter,
Object value)
Converts the given value into a text taking the given parameter information into account. |
Object |
parse(Parameter parameter,
String text)
Converts the given text into a value taking the given parameter information into account. |
void |
validate(Parameter parameter,
Object value)
Tests if the given value passes all constraints given in the supplied parameter information. |
| Method Detail |
|---|
Object parse(Parameter parameter,
String text)
throws ParamParseException
parameter - the parameter, must not be nulltext - the text to be converted into a value, must not be null
ParamParseException
String format(Parameter parameter,
Object value)
throws ParamFormatException
parameter - the parameter, must not be nullvalue - the value to be converted into a text, can be null
null.
ParamFormatException
void validate(Parameter parameter,
Object value)
throws ParamValidateException
null since parameters can be allowed to have the value 'null'.
parameter - the parameter, must not be nullvalue - the value to be tested, can be null
ParamValidateException
boolean equalValues(Parameter parameter,
Object value1,
Object value2)
parameter - the parameter, must not be nullvalue1 - the first value, can be nullvalue2 - the second value, can also be null
true if the value are equal, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||