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