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