org.apache.bval.constraints
Class SizeValidatorForArrayOfByte

java.lang.Object
  extended by org.apache.bval.constraints.SizeValidator
      extended by org.apache.bval.constraints.SizeValidatorForArrayOfByte
All Implemented Interfaces:
ConstraintValidator<Size,byte[]>

public class SizeValidatorForArrayOfByte
extends SizeValidator
implements ConstraintValidator<Size,byte[]>


Field Summary
 
Fields inherited from class org.apache.bval.constraints.SizeValidator
max, min
 
Constructor Summary
SizeValidatorForArrayOfByte()
           
 
Method Summary
 boolean isValid(byte[] array, ConstraintValidatorContext context)
          Checks the number of entries in an array.
 
Methods inherited from class org.apache.bval.constraints.SizeValidator
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

SizeValidatorForArrayOfByte

public SizeValidatorForArrayOfByte()
Method Detail

isValid

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

Specified by:
isValid in interface ConstraintValidator<Size,byte[]>
Parameters:
array - The array to validate.
context - 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 © 2010-2014 The Apache Software Foundation. All Rights Reserved.