Class MaxSizeSetConstraintValidator

    • Constructor Detail

      • MaxSizeSetConstraintValidator

        public MaxSizeSetConstraintValidator​(int maxValue,
                                             boolean inclusive)
        Creates the default instance of MaxSizeSetConstraintValidator with the specified parameters.
        Parameters:
        maxValue - the supported max value.
        inclusive - whether the specified minimum is inclusive or exclusive.
    • Method Detail

      • validate

        public void validate​(Set<?> values,
                             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<Set<?>>
        Parameters:
        values - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name