public class TruggerValidationEngine extends java.lang.Object implements ValidationEngine
This class checks against constraints that defines
validators
to check them.
Constructor and Description |
---|
TruggerValidationEngine(ValidatorFactory factory)
Creates a new engine using the given factory to create validators.
|
Modifier and Type | Method and Description |
---|---|
ValidationEngine |
filter(java.util.function.Predicate<Element> filter)
Validates only the elements that matches the given filter.
|
ValidationResult |
validate(java.lang.Object target)
Validates all elements in the given target.
|
public TruggerValidationEngine(ValidatorFactory factory)
factory
- the factory to use for creating validatorspublic ValidationEngine filter(java.util.function.Predicate<Element> filter)
ValidationEngine
filter
in interface ValidationEngine
filter
- the filter to restrict the elements.public ValidationResult validate(java.lang.Object target)
ValidationEngine
validate
in interface ValidationEngine
target
- the target to validate.