01: package nl.knowlogy.validation.validators;
02:
03: import nl.knowlogy.validation.Messages;
04:
05: public abstract class NumberValidator extends BasePropertyValidator {
06:
07: public NumberValidator(String propertyName) {
08: super (propertyName);
09: }
10:
11: protected abstract void doValidateNumber(Object object,
12: Number value, Messages messages);
13:
14: public void doValidatePropertyValue(Object object,
15: Object propertyValue, Messages messages) {
16: if (propertyValue != null) {
17: doValidateNumber(object, (Number) propertyValue, messages);
18: }
19: }
20:
21: }
|