Class AbstractMinConstraintValidator<T extends Comparable<T>>

    • Field Detail

      • minValue

        protected final T extends Comparable<T> minValue
        The minimum supported value.
      • inclusive

        protected final boolean inclusive
        Specifies whether the specified minimum is inclusive or not.
    • Constructor Detail

      • AbstractMinConstraintValidator

        protected AbstractMinConstraintValidator​(T minValue,
                                                 boolean inclusive)
        Creates an instance of the base validator class for minimum constraint.
        Parameters:
        minValue - the minimum supported value
        inclusive - specifies whether the specified minimum is inclusive or not.
    • Method Detail

      • validate

        public final void validate​(T actual,
                                   HttpModelType httpModelType,
                                   String modelName)
        Validates the single actual.

        The state of the actual must not be altered.

        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name
        Throws:
        io.rxmicro.http.error.ValidationException - if actual does not pass the constraint