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