A
- The constraint annotation type.P
- The TemporalAccessor
type that describes the part to validate.public abstract static class MomentPartValidator.ForZonedDateTime<A extends Annotation,P extends TemporalAccessor> extends MomentPartValidator<A,ZonedDateTime,P>
ZonedDateTime
validators that validate only a specific part of the value against a specific moment in time.MomentPartValidator.ForInstant<A extends Annotation,P extends TemporalAccessor>, MomentPartValidator.ForZonedDateTime<A extends Annotation,P extends TemporalAccessor>, MomentPartValidator.WithoutZoneId<A extends Annotation,T extends TemporalAccessor,P extends TemporalAccessor>
Modifier | Constructor and Description |
---|---|
protected |
ForZonedDateTime(Function<A,String> momentExtractor,
Function<String,P> momentParser,
Function<Clock,P> momentCreator,
Function<A,String> durationExtractor,
BiFunction<P,TemporalAmount,P> durationApplier,
Function<A,String> zoneIdExtractor,
Function<ZonedDateTime,P> partExtractor,
BiPredicate<P,P> validPredicate)
Creates a new validator that only validates
ZonedDateTime parts against a specific duration before or after a specific moment in
time. |
protected |
ForZonedDateTime(Function<A,String> momentExtractor,
Function<String,P> momentParser,
Function<Clock,P> momentCreator,
Function<A,String> zoneIdExtractor,
Function<ZonedDateTime,P> partExtractor,
BiPredicate<P,P> validPredicate)
Creates a new validator that only validates
ZonedDateTime parts against a specific moment in time. |
initialize, isValid, minus, not, plus, useReplacementMessageTemplate
protected ForZonedDateTime(Function<A,String> momentExtractor, Function<String,P> momentParser, Function<Clock,P> momentCreator, Function<A,String> zoneIdExtractor, Function<ZonedDateTime,P> partExtractor, BiPredicate<P,P> validPredicate)
ZonedDateTime
parts against a specific moment in time.momentExtractor
- A function that extracts the moment value from a constraint annotation.momentParser
- A function that parses a moment value into a TemporalAccessor
.momentCreator
- A function that creates a new moment for a given clock.zoneIdExtractor
- A function that extracts the zone id from a constraint annotation.partExtractor
- A function that extracts a part directly from a ZonedDateTime
.validPredicate
- A predicate that determines whether or not a value (the first argument) is valid compared to a specific moment
(the second argument).protected ForZonedDateTime(Function<A,String> momentExtractor, Function<String,P> momentParser, Function<Clock,P> momentCreator, Function<A,String> durationExtractor, BiFunction<P,TemporalAmount,P> durationApplier, Function<A,String> zoneIdExtractor, Function<ZonedDateTime,P> partExtractor, BiPredicate<P,P> validPredicate)
ZonedDateTime
parts against a specific duration before or after a specific moment in
time.momentExtractor
- A function that extracts the moment value from a constraint annotation.momentParser
- A function that parses a moment value into a TemporalAccessor
.momentCreator
- A function that creates a new moment for a given clock.durationExtractor
- A function that extracts the duration value from a constraint annotation.durationApplier
- A function that applies a duration to a TemporalAccessor
.zoneIdExtractor
- A function that extracts the zone id from a constraint annotation.partExtractor
- A function that extracts a part directly from a ZonedDateTime
.validPredicate
- A predicate that determines whether or not a value (the first argument) is valid compared to a specific moment
(the second argument).Copyright © 2021–2022. All rights reserved.