Interface ResourceValidator<R>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A ResourceValidator is a class that can validate the state of a resource's config object
-
Method Summary
Modifier and TypeMethodDescriptionValidate the correctness of the given resource.
-
Method Details
-
validate
Validate the correctness of the given resource. If the resource is valid, return an empty Optional. If the resource is invalid, return an Optional containing a ValidationErrors object that describes the validation errors.- Parameters:
resource
- The resource to validate- Returns:
- An Optional containing a ValidationErrors object if the resource is invalid, or an empty Optional if the resource is valid.
-