Class SizeValidatorForArraysOfByte

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

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

    • SizeValidatorForArraysOfByte

      public SizeValidatorForArraysOfByte()
  • Method Details

    • isValid

      public boolean isValid(byte[] array, ConstraintValidatorContext constraintValidatorContext)
      Checks the number of entries in an array.
      Specified by:
      isValid in interface ConstraintValidator<Size,byte[]>
      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.