Constructor and Description |
---|
OrValidator(Collection<Validator> validators)
Constructs an OrValidator with the given validators.
|
Modifier and Type | Method and Description |
---|---|
void |
addValidator(Validator validator)
Adds the given Validator to this Validator.
OrValidators get flattened. |
String |
getDescription()
Returns a human readable representation of this Validator.
|
boolean |
isAlwaysTrue()
Returns true, if this Validator validates all values to true.
The result must not necessarily be correct. |
String |
validate(Object value)
Checks whether the given value is valid.
|
public OrValidator(Collection<Validator> validators)
validators
- the validators.public void addValidator(Validator validator)
validator
- the validator to addpublic String validate(Object value)
Validator
validate
in interface Validator
value
- the value to checkValidator.validate(Object)
public String getDescription()
Validator
getDescription
in interface Validator
Validator.getDescription()
public boolean isAlwaysTrue()
Validator
isAlwaysTrue
in interface Validator
Validator.isAlwaysTrue()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a