T
- The type to constrainpublic interface DecimalMaxValidator<T> extends ConstraintValidator<javax.validation.constraints.DecimalMax,T>
DecimalMax
.VALID
Modifier and Type | Method and Description |
---|---|
int |
doComparison(T value,
java.math.BigDecimal bigDecimal)
Perform the comparison for the given value.
|
default boolean |
isValid(T value,
AnnotationValue<javax.validation.constraints.DecimalMax> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
isValid
default boolean isValid(@Nullable T value, @NonNull AnnotationValue<javax.validation.constraints.DecimalMax> annotationMetadata, @NonNull ConstraintValidatorContext context)
ConstraintValidator
Implementations 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 java.math.BigDecimal bigDecimal)
value
- The valuebigDecimal
- The big decimal