Class PositiveValidatorForCharSequence
- java.lang.Object
-
- org.hibernate.validator.internal.constraintvalidators.bv.number.sign.PositiveValidatorForCharSequence
-
- All Implemented Interfaces:
ConstraintValidator<Positive,CharSequence>
public class PositiveValidatorForCharSequence extends Object implements ConstraintValidator<Positive,CharSequence>
Check that the number being validated is positive.- Author:
- Guillaume Smet
-
-
Constructor Summary
Constructors Constructor Description PositiveValidatorForCharSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisValid(CharSequence value, ConstraintValidatorContext context)Implements the validation logic.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
-
-
-
Method Detail
-
isValid
public boolean isValid(CharSequence value, ConstraintValidatorContext context)
Description copied from interface:ConstraintValidatorImplements the validation logic. The state ofvaluemust not be altered.This method can be accessed concurrently, thread-safety must be ensured by the implementation.
- Specified by:
isValidin interfaceConstraintValidator<Positive,CharSequence>- Parameters:
value- object to validatecontext- context in which the constraint is evaluated- Returns:
falseifvaluedoes not pass the constraint
-
-