package com.atlassian.bitbucket.validation;

import com.atlassian.bitbucket.validation.annotation.NonNegativeInt;

import javax.validation.ConstraintValidator;

/**
 * Validator for the {@link NonNegativeInt} annotation.
 */
public class NonNegativeIntValidator extends IntegerValidator implements ConstraintValidator<NonNegativeInt, Object> {

    @Override
    public void initialize(NonNegativeInt constraintAnnotation) {
        allowNegative = false;
    }

}
