A
- The constraint annotation type.T
- The TemporalAccessor
type to validate.P
- The TemporalAccessor
type that describes the part to validate.public abstract static class MomentPartValidator.WithoutZoneId<A extends Annotation,T extends TemporalAccessor,P extends TemporalAccessor> extends MomentPartValidator<A,T,P>
TemporalAccessor
validators that validate only a specific part of the value against a specific moment in time.
This sub type of PartValidator
can be used for types that don't use zones like LocalDate
.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 |
WithoutZoneId(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<T,P> partExtractor,
BiPredicate<P,P> validPredicate)
Creates a new validator that only validates
TemporalAccessor parts against a specific duration before or after a specific moment in
time. |
protected |
WithoutZoneId(Function<A,String> momentExtractor,
Function<String,P> momentParser,
Function<Clock,P> momentCreator,
Function<A,String> zoneIdExtractor,
Function<T,P> partExtractor,
BiPredicate<P,P> validPredicate)
Creates a new validator that only validates
TemporalAccessor parts against a specific moment in time. |
initialize, isValid, minus, not, plus, useReplacementMessageTemplate
protected WithoutZoneId(Function<A,String> momentExtractor, Function<String,P> momentParser, Function<Clock,P> momentCreator, Function<A,String> zoneIdExtractor, Function<T,P> partExtractor, BiPredicate<P,P> validPredicate)
TemporalAccessor
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 from a TemporalAccessor
.validPredicate
- A predicate that determines whether or not a value (the first argument) is valid compared to a specific moment
(the second argument).protected WithoutZoneId(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<T,P> partExtractor, BiPredicate<P,P> validPredicate)
TemporalAccessor
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 from a TemporalAccessor
.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.