Package org.apache.bval.constraints
Class DigitsValidatorForNumber
- java.lang.Object
-
- org.apache.bval.constraints.DigitsValidatorForNumber
-
- All Implemented Interfaces:
jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,Number>
public class DigitsValidatorForNumber extends Object implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,Number>
Validates that theNumber
being validates matches the pattern defined in the constraint.
-
-
Constructor Summary
Constructors Constructor Description DigitsValidatorForNumber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFractional()
int
getIntegral()
void
initialize(jakarta.validation.constraints.Digits annotation)
boolean
isValid(Number num, jakarta.validation.ConstraintValidatorContext context)
void
setFractional(int fractional)
void
setIntegral(int integral)
-
-
-
Method Detail
-
getIntegral
public int getIntegral()
-
setIntegral
public void setIntegral(int integral)
-
getFractional
public int getFractional()
-
setFractional
public void setFractional(int fractional)
-
initialize
public void initialize(jakarta.validation.constraints.Digits annotation)
- Specified by:
initialize
in interfacejakarta.validation.ConstraintValidator<jakarta.validation.constraints.Digits,Number>
-
-