org.hibernate.validator.internal.constraintvalidators

## Class SizeValidatorForArraysOfShort

- java.lang.Object
- - org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfPrimitives
  - - org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfShort

- All Implemented Interfaces:
    ConstraintValidator<Size,short[]>

      public class SizeValidatorForArraysOfShort
      extends SizeValidatorForArraysOfPrimitives
      implements ConstraintValidator<Size,short[]>

  Author:
    Hardy Ferentschik

- - ### Field Summary

    - ### Fields inherited from class org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfPrimitives

      `max, min`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SizeValidatorForArraysOfShort()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isValid(short[] array, ConstraintValidatorContext constraintValidatorContext)` Checks the number of entries in an array.

    - ### Methods inherited from class org.hibernate.validator.internal.constraintvalidators.SizeValidatorForArraysOfPrimitives

      `initialize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.validation.ConstraintValidator

      `initialize`

- - ### Constructor Detail

    - #### SizeValidatorForArraysOfShort

          public SizeValidatorForArraysOfShort()

  - ### Method Detail

    - #### isValid

          public boolean isValid(short[] array,
                        ConstraintValidatorContext constraintValidatorContext)

      Checks the number of entries in an array.
      Specified by:
        `isValid` in interface `ConstraintValidator<Size,short[]>`
      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.

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved