public final class ValidateLatest extends Object implements SchemaValidator
A SchemaValidator
for validating the provided schema against the
first Schema
in the iterable in validate(Schema, Iterable)
.
Uses the SchemaValidationStrategy
provided in the constructor to
validate the schema against the first Schema in the iterable, if it exists,
via SchemaValidationStrategy.validate(Schema, Schema)
.
Constructor and Description |
---|
ValidateLatest(SchemaValidationStrategy strategy) |
Modifier and Type | Method and Description |
---|---|
void |
validate(Schema toValidate,
Iterable<Schema> schemasInOrder)
Validate one schema against others.
|
public ValidateLatest(SchemaValidationStrategy strategy)
strategy
- The strategy to use for validation of pairwise schemas.public void validate(Schema toValidate, Iterable<Schema> schemasInOrder) throws SchemaValidationException
SchemaValidator
validate
in interface SchemaValidator
toValidate
- The schema to validateschemasInOrder
- The schemas to validate against, in order from most recent
to latest if applicableSchemaValidationException
- if the schema fails to validate.Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.