T
- The target type@FunctionalInterface public interface DigitsValidator<T> extends ConstraintValidator<javax.validation.constraints.Digits,T>
Digits
validator implementation.VALID
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getBigDecimal(T value)
Resolve a big decimal for the given value.
|
default boolean |
isValid(T value,
AnnotationValue<javax.validation.constraints.Digits> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
isValid
default boolean isValid(@Nullable T value, @NonNull AnnotationValue<javax.validation.constraints.Digits> 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 constraintjava.math.BigDecimal getBigDecimal(@NonNull T value)
value
- The value