Class SizeValidatorForArraysOfInt

java.lang.Object
org.hibernate.validator.internal.constraintvalidators.bv.size.SizeValidatorForArraysOfPrimitives
org.hibernate.validator.internal.constraintvalidators.bv.size.SizeValidatorForArraysOfInt
All Implemented Interfaces:
ConstraintValidator<Size,int[]>

public class SizeValidatorForArraysOfInt extends SizeValidatorForArraysOfPrimitives implements ConstraintValidator<Size,int[]>
Author:
Hardy Ferentschik
  • Constructor Details

    • SizeValidatorForArraysOfInt

      public SizeValidatorForArraysOfInt()
  • Method Details

    • isValid

      public boolean isValid(int[] array, ConstraintValidatorContext constraintValidatorContext)
      Checks the number of entries in an array.
      Specified by:
      isValid in interface ConstraintValidator<Size,int[]>
      Parameters:
      array - The array to validate.
      constraintValidatorContext - context in which the constraint is evaluated.
      Returns:
      Returns true if the array is null or the number of entries in array is between the specified min and max values (inclusive), false otherwise.