protected abstract static class JsonSchemaValidatorFactory.NumericValidator extends Object implements Validator
Validator.Factory, Validator.SchemaDocumentResolver
Modifier | Constructor and Description |
---|---|
protected |
JsonSchemaValidatorFactory.NumericValidator(String propertyName,
Number number) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
isValid(double expectedValue,
double actualValue)
Evaluate whether the actual value and expected value violate the schema rule.
|
protected abstract String |
ruleDescription() |
String |
toString() |
void |
validate(Object fieldValue,
String fieldName,
Document parent,
Path pathToParent,
Problems problems,
Validator.SchemaDocumentResolver resolver)
Validate a portion of the supplied document.
|
public void validate(Object fieldValue, String fieldName, Document parent, Path pathToParent, Problems problems, Validator.SchemaDocumentResolver resolver)
Validator
validate
in interface Validator
fieldValue
- the field value to be validated; may be nullfieldName
- the field name to be validated; may be null if the field value is not known or the validator is to
validate the documentparent
- the document; never nullpathToParent
- the path to the supplied document; never null but may be a zero-length path if the document is the
top-level documentproblems
- the problems where any errors or warnings should be recorded; never nullresolver
- the component that can be used to resolve references to other schema documentsprotected abstract boolean isValid(double expectedValue, double actualValue)
expectedValue
- the expected valueactualValue
- the actual valueprotected abstract String ruleDescription()
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.