V
- The type of map keyspublic final class MapKeyConstraint<V> extends SequenceElementConstraint<Map<V,Object>,V>
SequenceElementConstraint
implementation
that performs validation of map keys.ConstraintFactory.mapKey(Constraint)
constraint
Modifier and Type | Method and Description |
---|---|
protected <T> Map<V,Object> |
doValidate(Map<V,Object> map,
ValidationContext<T> context,
List<ConstraintViolationException> violations)
Checks whether all keys of the specified map conforms to the constraint
of map keys.
|
Class<?> |
getType()
Returns
java.util.Map type. |
appendMessageArguments, getConstraint, validate
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
public Class<?> getType()
java.util.Map
type.java.util.Map
type.protected <T> Map<V,Object> doValidate(Map<V,Object> map, ValidationContext<T> context, List<ConstraintViolationException> violations)
doValidate
in class SequenceElementConstraint<Map<V,Object>,V>
T
- The type of validated entity.map
- Map whose keys to be checked.context
- Validation context.violations
- List of violations.Copyright © 2011–2020 FoxLabs. All rights reserved.