V - is the generic type of the value that shall be validated.public interface HasValueValidators<V>
| Modifier and Type | Method and Description |
|---|---|
void |
addValidator(ValueValidator<? super V> validator)
This method adds the given
ValueValidator to this object. |
boolean |
removeValidator(ValueValidator<? super V> validator)
This method removes the given
ValueValidator from this object. |
void addValidator(ValueValidator<? super V> validator)
ValueValidator to this object. All ValueValidators are
invoked in the same order as they are added by this method. They
are invoked no matter if the previous ValueValidators
failed or succeeded. You should always design ValueValidators in a robust and reusable way (e.g.
a range validator should accept null as valid input so it can be used for both mandatory and
optional fields).validator - is the ValueValidator to add.boolean removeValidator(ValueValidator<? super V> validator)
ValueValidator from this object. validator - is the ValueValidator to remove.true if the ValueValidator has actually been removed, false
otherwise (it has NOT previously been added).Copyright © 2001–2015 mmm-Team. All rights reserved.