Class ValidatorMap
java.lang.Object
com.adobe.epubcheck.util.ValidatorMap
A utility to store
XMLValidator references and return a list of
validators applicable to a given ValidationContext.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<XMLValidators, com.google.common.base.Predicate<? super ValidationContext>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateValidatorMap(Map<XMLValidators, com.google.common.base.Predicate<? super ValidationContext>> validators) -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidatorMap.Builderbuilder()Returns a new builder.getValidators(ValidationContext context) Returns a list ofXMLValidators applicable to the givenValidationContext, as determined by thePredicateused to build this map.
-
Field Details
-
validators
-
-
Constructor Details
-
ValidatorMap
private ValidatorMap(Map<XMLValidators, com.google.common.base.Predicate<? super ValidationContext>> validators)
-
-
Method Details
-
builder
Returns a new builder. -
getValidators
Returns a list ofXMLValidators applicable to the givenValidationContext, as determined by thePredicateused to build this map. The validators are returned in the order in which they have been added to the builder.XMLValidatorinstances are built dynamically, only when the context satisfies the underlying predicate.- Parameters:
context- a validation context- Returns:
- the list of validators applicable to
context
-