public class ValidatorCollectionSize extends AbstractValidatorRange<Collection<?>,Integer>
ValueValidator validating that the
size of a given Collection is within a predefined Range.CODEPROPERTY_MANDATORY, PROPERTY_MAXIMUM, PROPERTY_MINIMUM| Constructor and Description |
|---|
ValidatorCollectionSize(int maxLength)
The constructor.
|
ValidatorCollectionSize(Range<Integer> range)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Integer |
convertValue(Collection<?> value)
Converts the value to the type of the range.
|
equals, getCode, getProperty, hashCode, validateNotNullvalidate, validateNullappend, contains, createBundle, isDynamic, isMandatory, validatepublic ValidatorCollectionSize(Range<Integer> range)
range - is the Range the value has to be contained in.public ValidatorCollectionSize(int maxLength)
maxLength - the maximum size allowed for the
Collection values.protected Integer convertValue(Collection<?> value)
AbstractValidatorRangeconvertValue in class AbstractValidatorRange<Collection<?>,Integer>value - is the value to convert.Copyright © 2001–2016 mmm-Team. All rights reserved.