Class SubEnumConstraintValidator<T extends Enum<T>>

    • Constructor Detail

      • SubEnumConstraintValidator

        public SubEnumConstraintValidator​(Class<T> enumClass,
                                          List<String> include,
                                          List<String> exclude)
        Creates the default instance of SubEnumConstraintValidator with the specified parameters.
        Parameters:
        enumClass - enum class
        include - include enum constants
        exclude - exclude enum constants
    • Method Detail

      • validate

        public void validate​(T actual,
                             HttpModelType httpModelType,
                             String modelName)
        Description copied from interface: ConstraintValidator
        Validates the single actual.

        The state of the actual must not be altered.

        Specified by:
        validate in interface ConstraintValidator<T extends Enum<T>>
        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name