Class ValidatorBuilderInstant<PARENT>
- 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<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
-
- io.github.mmm.validation.temporal.instant.ValidatorBuilderInstant<PARENT>
-
- Type Parameters:
PARENT
- the generic type of theparent builder
.
- All Implemented Interfaces:
Builder<Validator<? super Instant>>
,ValidatorRegistry<Instant,ValidatorBuilderInstant<PARENT>>
public class ValidatorBuilderInstant<PARENT> extends ValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
Validator builder
forInstant
.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description ValidatorBuilderInstant(PARENT parent)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidatorBuilderInstant<PARENT>
after(Instant value)
Adds
a validator that checks that the date/time is after the givenvalue
.ValidatorBuilderInstant<PARENT>
after(Supplier<Instant> valueSource)
Adds
a validator that checks that the date/time is after the givenvalue
.ValidatorBuilderInstant<PARENT>
before(Instant value)
Adds
a validator that checks that the date/time is before the givenvalue
.ValidatorBuilderInstant<PARENT>
before(Supplier<Instant> valueSource)
Adds
a validator that checks that the date/time is before the givenvalue
.ValidatorBuilderInstant<PARENT>
future()
Adds
a validator that checks that the date/time is in the future.protected Instant
parse(String value)
ValidatorBuilderInstant<PARENT>
past()
Adds
a validator that checks that the date/time is in the past.-
Methods inherited from class io.github.mmm.validation.temporal.ValidatorBuilderTemporal
range
-
Methods inherited from class io.github.mmm.validation.main.ComparableValidatorBuilder
range, range
-
Methods inherited from class io.github.mmm.validation.main.ObjectValidatorBuilder
add, add, and, build, getValidators, mandatory, max, min, self
-
-
-
-
Method Detail
-
parse
protected Instant parse(String value)
- Specified by:
parse
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Parameters:
value
- the value asString
.- Returns:
- the parsed value.
-
past
public ValidatorBuilderInstant<PARENT> past()
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is in the past.- Specified by:
past
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Returns:
- this build instance for fluent API calls.
-
future
public ValidatorBuilderInstant<PARENT> future()
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is in the future.- Specified by:
future
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Returns:
- this build instance for fluent API calls.
-
after
public ValidatorBuilderInstant<PARENT> after(Instant value)
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is after the givenvalue
.- Specified by:
after
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Parameters:
value
- the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
after
public ValidatorBuilderInstant<PARENT> after(Supplier<Instant> valueSource)
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is after the givenvalue
.- Specified by:
after
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Parameters:
valueSource
- theSupplier
of the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
before
public ValidatorBuilderInstant<PARENT> before(Instant value)
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is before the givenvalue
.- Specified by:
before
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Parameters:
value
- the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
before
public ValidatorBuilderInstant<PARENT> before(Supplier<Instant> valueSource)
Description copied from class:ValidatorBuilderTemporal
Adds
a validator that checks that the date/time is before the givenvalue
.- Specified by:
before
in classValidatorBuilderTemporal<Instant,PARENT,ValidatorBuilderInstant<PARENT>>
- Parameters:
valueSource
- theSupplier
of the date/time to compare.- Returns:
- this build instance for fluent API calls.
-
-