Class ValidatorLocalDateBefore
- java.lang.Object
-
- io.github.mmm.validation.AbstractValidator<V>
-
- io.github.mmm.validation.AbstractValueValidator<V>
-
- io.github.mmm.validation.temporal.ValidatorTemporalBefore<LocalDate>
-
- io.github.mmm.validation.temporal.localdate.ValidatorLocalDateBefore
-
public class ValidatorLocalDateBefore extends ValidatorTemporalBefore<LocalDate>
Implementation ofValidatorTemporalBefore
forLocalDate
.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.validation.temporal.ValidatorTemporalBefore
ID
-
Fields inherited from interface io.github.mmm.validation.Validator
ID_MANDATORY
-
-
Constructor Summary
Constructors Constructor Description ValidatorLocalDateBefore(LocalDate value)
The constructor.ValidatorLocalDateBefore(Supplier<LocalDate> valueSource)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isBefore(LocalDate value, LocalDate limit)
-
Methods inherited from class io.github.mmm.validation.temporal.ValidatorTemporalBefore
equals, getId, getMax, hashCode, isDynamic, validateNotNull
-
Methods inherited from class io.github.mmm.validation.AbstractValueValidator
validate, validateNull
-
Methods inherited from class io.github.mmm.validation.AbstractValidator
source2string, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.base.lang.Composable
getChild, getChildCount, iterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface io.github.mmm.validation.Validator
append, append, containsId, getMin, isMandatory, validate
-
-
-
-
Constructor Detail
-
ValidatorLocalDateBefore
public ValidatorLocalDateBefore(Supplier<LocalDate> valueSource)
The constructor.- Parameters:
valueSource
- theSupplier
of the value to compare to.
-
ValidatorLocalDateBefore
public ValidatorLocalDateBefore(LocalDate value)
The constructor.- Parameters:
value
- the value to compare to.
-
-
Method Detail
-
isBefore
protected boolean isBefore(LocalDate value, LocalDate limit)
- Specified by:
isBefore
in classValidatorTemporalBefore<LocalDate>
- Parameters:
value
- the date to check.limit
- the upper bound to compare to.- Returns:
true
ifvalue
is beforelimit
,false
otherwise.
-
-