T - The type to constrainpublic interface DecimalMaxValidator<T> extends ConstraintValidator<DecimalMax,T>
DecimalMax.VALID| Modifier and Type | Method and Description |
|---|---|
int |
doComparison(T value,
BigDecimal bigDecimal)
Perform the comparison for the given value.
|
default boolean |
isValid(T value,
AnnotationValue<DecimalMax> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
isValidinitializedefault boolean isValid(@Nullable T value, @Nonnull AnnotationValue<DecimalMax> annotationMetadata, @Nonnull ConstraintValidatorContext context)
ConstraintValidatorImplementations should be thread-safe and immutable.
value - object to validateannotationMetadata - The annotation metadatacontext - The context objectfalse if value does not pass the constraintint doComparison(@Nonnull T value, @Nonnull BigDecimal bigDecimal)
value - The valuebigDecimal - The big decimal