public abstract class AbstractNumberValidator<T extends Number> extends BasicValidator<T>
| Modifier and Type | Field and Description |
|---|---|
protected T |
maxValue |
protected T |
minValue |
notNull, targetKey| Constructor and Description |
|---|
AbstractNumberValidator(String targetKey) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
isGreaterThanMaxValue(T target) |
protected abstract boolean |
isLessThanMinValue(T target) |
void |
setMaxValue(T maxValue) |
void |
setMinValue(T minValue) |
boolean |
validate(T target,
ValidationResult result) |
setNotNullpublic AbstractNumberValidator(String targetKey)
public void setMinValue(T minValue)
public void setMaxValue(T maxValue)
public boolean validate(T target, ValidationResult result)
protected abstract boolean isLessThanMinValue(T target)
protected abstract boolean isGreaterThanMaxValue(T target)
Copyright © 2020 CrafterCMS. All rights reserved.