Class ValidatorTemporalBefore<V>

    • Constructor Detail

      • ValidatorTemporalBefore

        public ValidatorTemporalBefore​(Supplier<V> valueSource)
        The constructor.
        Parameters:
        valueSource - the Supplier of the value to compare to.
      • ValidatorTemporalBefore

        public ValidatorTemporalBefore​(V value)
        The constructor.
        Parameters:
        value - the value to compare to.
    • Method Detail

      • isDynamic

        public boolean isDynamic()
        Description copied from class: AbstractValidator
        This method determines if this Validator is dynamic. Here dynamic means that the validation of the same input may not always return the same validation result (e.g. it holds references to instances that have dynamic impact on the validation).
        Overrides:
        isDynamic in class AbstractValidator<V>
        Returns:
        true if this Validator is dynamic, false otherwise.
      • validateNotNull

        protected NlsMessage validateNotNull​(V value)
        Description copied from class: AbstractValueValidator
        This method performs the validation in case value is NOT null. This method contains the actual custom logic for the validation. It is therefore designed in a way that makes it most simple to implement custom validators.
        Specified by:
        validateNotNull in class AbstractValueValidator<V>
        Parameters:
        value - the value to validate.
        Returns:
        the failure message or null if the the given value is valid.
      • isBefore

        protected abstract boolean isBefore​(V value,
                                            V limit)
        Parameters:
        value - the date to check.
        limit - the upper bound to compare to.
        Returns:
        true if value is before limit, false otherwise.
      • getMax

        public Object getMax()
        Returns:
        the maximum allowed value. Typically of type <V> but this can not be guaranteed.