T
- The target type.@FunctionalInterface public interface DecimalMinValidator<T> extends ConstraintValidator<DecimalMin,T>
DecimalMin
.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<DecimalMin> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
isValid
initialize
default boolean isValid(@Nullable T value, @NonNull AnnotationValue<DecimalMin> 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 BigDecimal bigDecimal)
value
- The valuebigDecimal
- The big decimal