org.hibernate.validator.constraints.impl
Class SizeValidatorForArraysOfBoolean

java.lang.Object
  extended by org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfPrimitives
      extended by org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfBoolean
All Implemented Interfaces:
ConstraintValidator<Size,boolean[]>

public class SizeValidatorForArraysOfBoolean
extends SizeValidatorForArraysOfPrimitives
implements ConstraintValidator<Size,boolean[]>

Author:
Hardy Ferentschik

Field Summary
 
Fields inherited from class org.hibernate.validator.constraints.impl.SizeValidatorForArraysOfPrimitives
max, min
 
Constructor Summary
SizeValidatorForArraysOfBoolean()
           
 
Method Summary
 boolean isValid(boolean[] array, ConstraintValidatorContext constraintValidatorContext)
          Checks the number of entries in an array.
 
Methods inherited from class org.hibernate.validator.constraints.impl.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

SizeValidatorForArraysOfBoolean

public SizeValidatorForArraysOfBoolean()
Method Detail

isValid

public boolean isValid(boolean[] array,
                       ConstraintValidatorContext constraintValidatorContext)
Checks the number of entries in an array.

Specified by:
isValid in interface ConstraintValidator<Size,boolean[]>
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-2011 Red Hat Middleware, LLC. All Rights Reserved