Package io.github.mmm.validation.pattern
Class ValidatorPatternSize
- java.lang.Object
-
- io.github.mmm.validation.AbstractValidator<V>
-
- io.github.mmm.validation.AbstractValueValidator<V>
-
- io.github.mmm.validation.main.AbstractValidatorRange<Pattern,Number>
-
- io.github.mmm.validation.pattern.ValidatorPatternSize
-
-
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 ValidatorPatternSize(int maxLength)
The constructor.ValidatorPatternSize(io.github.mmm.base.range.Range<Number> range)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Integer
convertValue(Pattern 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
-
ValidatorPatternSize
public ValidatorPatternSize(io.github.mmm.base.range.Range<Number> range)
The constructor.- Parameters:
range
- is theRange
the value has to becontained in
.
-
ValidatorPatternSize
public ValidatorPatternSize(int maxLength)
The constructor.- Parameters:
maxLength
- themaximum
size
allowed for theCollection
values.
-
-
Method Detail
-
convertValue
protected Integer convertValue(Pattern value)
Description copied from class:AbstractValidatorRange
Converts the value to the type of the range.- Overrides:
convertValue
in classAbstractValidatorRange<Pattern,Number>
- Parameters:
value
- is the value to convert.- Returns:
- the converted value.
-
isLength
protected boolean isLength()
- Overrides:
isLength
in classAbstractValidatorRange<Pattern,Number>
- Returns:
true
if validating the lenght of the value,false
otherwise.
-
-