public static final class SizeConstraint.ArrayType extends SizeConstraint<Object>
SizeConstraint
implementation for all
array types.Size
,
MinSize
,
MaxSize
,
ConstraintFactory.arraySize(int, int)
,
ConstraintFactory.arrayMinSize(int)
,
ConstraintFactory.arrayMaxSize(int)
SizeConstraint.ArrayType, SizeConstraint.CollectionType, SizeConstraint.MapType, SizeConstraint.StringType
Modifier and Type | Method and Description |
---|---|
protected <T> int |
getSize(Object value,
ValidationContext<T> context)
Returns length of the specified array.
|
Class<?> |
getType()
Returns
java.lang.Object type. |
appendMessageArguments, check, getMaxSize, getMessageTemplate, getMinSize
validate
public Class<?> getType()
java.lang.Object
type.java.lang.Object
type.protected <T> int getSize(Object value, ValidationContext<T> context)
getSize
in class SizeConstraint<Object>
T
- The type of validated entity.value
- Array.context
- Validation context.Copyright © 2011–2020 FoxLabs. All rights reserved.