Class ValidatorMapSize
- java.lang.Object
-
- io.github.mmm.validation.AbstractValidator<V>
-
- io.github.mmm.validation.AbstractValueValidator<V>
-
- io.github.mmm.validation.main.AbstractValidatorRange<Map<?,?>,Number>
-
- io.github.mmm.validation.collection.ValidatorMapSize
-
public class ValidatorMapSize extends AbstractValidatorRange<Map<?,?>,Number>
- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from class io.github.mmm.validation.main.AbstractValidatorRange
ID, range
-
Fields inherited from interface io.github.mmm.validation.Validator
ID_MANDATORY
-
-
Constructor Summary
Constructors Constructor Description ValidatorMapSize(int maxLength)
The constructor.ValidatorMapSize(Range<Number> range)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Integer
convertValue(Map<?,?> value)
Converts the value to the type of the range.protected boolean
isLength()
-
Methods inherited from class io.github.mmm.validation.main.AbstractValidatorRange
equals, getId, getRange, hashCode, validateNotNull
-
Methods inherited from class io.github.mmm.validation.AbstractValueValidator
validate, validateNull
-
Methods inherited from class io.github.mmm.validation.AbstractValidator
isDynamic, source2string, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.base.lang.Composable
getChild, getChildCount, iterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface io.github.mmm.validation.Validator
append, append, containsId, getMax, getMin, isMandatory, validate
-
-
-
-
Constructor Detail
-
ValidatorMapSize
public ValidatorMapSize(Range<Number> range)
The constructor.- Parameters:
range
- is theRange
the value has to becontained in
.
-
-
Method Detail
-
convertValue
protected Integer convertValue(Map<?,?> value)
Description copied from class:AbstractValidatorRange
Converts the value to the type of the range.- Overrides:
convertValue
in classAbstractValidatorRange<Map<?,?>,Number>
- Parameters:
value
- is the value to convert.- Returns:
- the converted value.
-
isLength
protected boolean isLength()
- Overrides:
isLength
in classAbstractValidatorRange<Map<?,?>,Number>
- Returns:
true
if validating the lenght of the value,false
otherwise.
-
-