Package org.apache.bval.constraints
Class TimeValidator<A extends Annotation,T>
- java.lang.Object
-
- org.apache.bval.constraints.TimeValidator<A,T>
-
- All Implemented Interfaces:
jakarta.validation.ConstraintValidator<A,T>
- Direct Known Subclasses:
FutureOrPresentValidator
,FutureValidator
,PastOrPresentValidator
,PastValidator
public abstract class TimeValidator<A extends Annotation,T> extends Object implements jakarta.validation.ConstraintValidator<A,T>
-
-
Field Summary
Fields Modifier and Type Field Description protected static Comparator<ChronoLocalDate>
CHRONO_LOCAL_DATE_COMPARATOR
protected static Comparator<ChronoLocalDateTime<?>>
CHRONO_LOCAL_DATE_TIME_COMPARATOR
protected static Comparator<ChronoZonedDateTime<?>>
CHRONO_ZONED_DATE_TIME_COMPARATOR
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimeValidator(Function<Clock,T> now, Comparator<? super T> cmp, IntPredicate test)
protected
TimeValidator(Function<Clock,T> now, IntPredicate test)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(T value, jakarta.validation.ConstraintValidatorContext context)
-
-
-
Field Detail
-
CHRONO_LOCAL_DATE_COMPARATOR
protected static final Comparator<ChronoLocalDate> CHRONO_LOCAL_DATE_COMPARATOR
-
CHRONO_LOCAL_DATE_TIME_COMPARATOR
protected static final Comparator<ChronoLocalDateTime<?>> CHRONO_LOCAL_DATE_TIME_COMPARATOR
-
CHRONO_ZONED_DATE_TIME_COMPARATOR
protected static final Comparator<ChronoZonedDateTime<?>> CHRONO_ZONED_DATE_TIME_COMPARATOR
-
-
Constructor Detail
-
TimeValidator
protected TimeValidator(Function<Clock,T> now, IntPredicate test)
-
TimeValidator
protected TimeValidator(Function<Clock,T> now, Comparator<? super T> cmp, IntPredicate test)
-
-
Method Detail
-
isValid
public final boolean isValid(T value, jakarta.validation.ConstraintValidatorContext context)
- Specified by:
isValid
in interfacejakarta.validation.ConstraintValidator<A extends Annotation,T>
-
-