Package io.debezium.config
Interface Field.Validator
- All Known Implementing Classes:
Field.EnumRecommender
,Field.RangeValidator
- Enclosing class:
- Field
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface that can be used to validate field values.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Field.Validator
and
(Field.Validator other) Obtain a newField.Validator
object that validates using this validator and the supplied validator.int
validate
(Configuration config, Field field, Field.ValidationOutput problems) Validate the supplied value for the field, and report any problems to the designated consumer.
-
Method Details
-
validate
Validate the supplied value for the field, and report any problems to the designated consumer.- Parameters:
config
- the configuration containing the field to be validated; may not be nullfield
- theField
being validated; never nullproblems
- the consumer to be called with each problem; never null- Returns:
- the number of problems that were found, or 0 if the value is valid
-
and
Obtain a newField.Validator
object that validates using this validator and the supplied validator.- Parameters:
other
- the validation function to call after this- Returns:
- the new validator, or this validator if
other
isnull
or equal tothis
-