K
- the type identifying the keys in the value mapV
- the value map typepublic static class DefaultValueMap.DefaultValidator<K,V extends ValueMap<K,?>> extends java.lang.Object implements ValueMap.Validator<K,V>
Constructor and Description |
---|
DefaultValidator() |
Modifier and Type | Method and Description |
---|---|
void |
addRevalidationListener(EventListener listener) |
boolean |
isNullable(V valueMap,
K key) |
boolean |
isValid(V valueMap) |
void |
removeRevalidationListener(EventListener listener) |
void |
revalidate()
Notifies all re-validation listeners that a re-validation is called for, for example
due to modified validation settings
|
void |
validate(V valueMap)
Checks if the values in the given value map are valid
|
void |
validate(V valueMap,
K key)
Checks if the value associated with the give key is valid, throws a ValidationException if not
|
public boolean isNullable(V valueMap, K key)
isNullable
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
valueMap
- the value mapkey
- the keypublic boolean isValid(V valueMap)
public void validate(V valueMap) throws ValidationException
validate
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
valueMap
- the value mapValidationException
- in case of an invalid valuepublic void validate(V valueMap, K key) throws ValidationException
validate
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
valueMap
- the value map to validatekey
- the key the value is associated withValidationException
- if the given value is not valid for the given keypublic final void revalidate()
revalidate
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
ValueMap.Validator.addRevalidationListener(EventListener)
public final void addRevalidationListener(EventListener listener)
addRevalidationListener
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
listener
- a listener notified each time a re-validation of all values is required, for example
when the underlying validation settings have changedpublic final void removeRevalidationListener(EventListener listener)
removeRevalidationListener
in interface ValueMap.Validator<K,V extends ValueMap<K,?>>
listener
- a listener to remove