Class ValidatorBuilderTemporal<V extends Comparable<?>,PARENT,SELF extends ValidatorBuilderTemporal<V,PARENT,SELF>>
java.lang.Object
io.github.mmm.validation.main.ObjectValidatorBuilder<V,PARENT,SELF>
io.github.mmm.validation.main.ComparableValidatorBuilder<V,PARENT,SELF>
io.github.mmm.validation.temporal.ValidatorBuilderTemporal<V,PARENT,SELF>
- Type Parameters:
V- the generic type of the value tovalidate.PARENT- the generic type of theparent builder.SELF- the generic type of this builder itself (this).
- All Implemented Interfaces:
io.github.mmm.base.lang.Builder<Validator<? super V>>,ValidatorRegistry<V,SELF>
- Direct Known Subclasses:
ValidatorBuilderInstant,ValidatorBuilderLocalDate,ValidatorBuilderLocalDateTime,ValidatorBuilderLocalTime,ValidatorBuilderOffsetDateTime,ValidatorBuilderOffsetTime,ValidatorBuilderZonedDateTime
public abstract class ValidatorBuilderTemporal<V extends Comparable<?>,PARENT,SELF extends ValidatorBuilderTemporal<V,PARENT,SELF>>
extends ComparableValidatorBuilder<V,PARENT,SELF>
Validator builder for date and time values.- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SELFAddsa validator that checks that the date/time is after the givenvalue.abstract SELFAddsa validator that checks that the date/time is after the givenvalue.abstract SELFAddsa validator that checks that the date/time is before the givenvalue.abstract SELFAddsa validator that checks that the date/time is before the givenvalue.abstract SELFfuture()Addsa validator that checks that the date/time is in the future.protected abstract Vabstract SELFpast()Addsa validator that checks that the date/time is in the past.This method allows to define a range in a generic way.Methods inherited from class io.github.mmm.validation.main.ComparableValidatorBuilder
range, rangeMethods inherited from class io.github.mmm.validation.main.ObjectValidatorBuilder
add, add, and, build, getValidators, mandatory, max, min, self
-
Constructor Details
-
ValidatorBuilderTemporal
The constructor.- Parameters:
parent- theparentbuilder.
-
-
Method Details
-
parse
- Parameters:
value- the value asString.- Returns:
- the parsed value.
-
range
Description copied from class:ObjectValidatorBuilderThis method allows to define a range in a generic way. If you have a properly typed builder please use more specific methods such asComparableValidatorBuilder.range(io.github.mmm.base.range.Range)instead.- Specified by:
rangein classObjectValidatorBuilder<V extends Comparable<?>,PARENT, SELF extends ValidatorBuilderTemporal<V, PARENT, SELF>> - Parameters:
min- the minimum value allowed ornullfor no lower bound.max- the maximum value allowed ornullfor no upper bound.- Returns:
- this build instance for fluent API calls.
-
past
Addsa validator that checks that the date/time is in the past.- Returns:
- this build instance for fluent API calls.
-
future
Addsa validator that checks that the date/time is in the future.- Returns:
- this build instance for fluent API calls.
-
after
Addsa validator that checks that the date/time is after the givenvalue.- Parameters:
value- the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
after
Addsa validator that checks that the date/time is after the givenvalue.- Parameters:
valueSource- theSupplierof the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
before
Addsa validator that checks that the date/time is before the givenvalue.- Parameters:
value- the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
before
Addsa validator that checks that the date/time is before the givenvalue.- Parameters:
valueSource- theSupplierof the date/time to compare.- Returns:
- this build instance for fluent API calls.
-