A
- The constraint annotation type.P
- The TemporalAccessor
type that describes the part to validate.public abstract static class PartValidator.ForZonedDateTime<A extends Annotation,P extends TemporalAccessor> extends PartValidator<A,ZonedDateTime,P>
ZonedDateTime
validators that validate only a specific part of the value.PartValidator.ForInstant<A extends Annotation,P extends TemporalAccessor>, PartValidator.ForZonedDateTime<A extends Annotation,P extends TemporalAccessor>, PartValidator.WithoutZoneId<A extends Annotation,T extends TemporalAccessor,P extends TemporalAccessor>
Modifier | Constructor and Description |
---|---|
protected |
ForZonedDateTime(Function<A,String> zoneIdExtractor,
Function<ZonedDateTime,P> partExtractor,
Function<A,BiPredicate<P,ClockProvider>> partPredicateExtractor)
Creates a new validator.
|
initialize, isValid, minus, not, plus, useReplacementMessageTemplate
protected ForZonedDateTime(Function<A,String> zoneIdExtractor, Function<ZonedDateTime,P> partExtractor, Function<A,BiPredicate<P,ClockProvider>> partPredicateExtractor)
zoneIdExtractor
- A function that extracts the zone id from a constraint annotation.partExtractor
- A function that extracts a part from a TemporalAccessor
.partPredicateExtractor
- A function that extracts a part predicate from a constraint annotation.
This predicate will be called in BaseValidator.isValid(Object, ConstraintValidatorContext)
,
with as arguments the part extracted from the value to validate and the ClockProvider
returned by
ConstraintValidatorContext.getClockProvider()
.Copyright © 2021–2022. All rights reserved.