1 /*
2  * Hibernate Validator, declare and validate application constraints
3  *
4  * License: Apache License, Version 2.0
5  * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
6  */

7 package org.hibernate.validator.internal.constraintvalidators.bv.number.bound;
8
9 /**
10  * Check that the number being validated is less than or equal to the maximum
11  * value specified.
12  *
13  * @author Marko Bekhta
14  */

15 public class MaxValidatorForInteger extends AbstractMaxValidator<Integer> {
16
17     @Override
18     protected int compare(Integer number) {
19         return NumberComparatorHelper.compare( number.longValue(), maxValue );
20     }
21 }
22