com.github.fge.jsonschema.keyword.validator.helpers
Class DivisorValidator

java.lang.Object
  extended by com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
      extended by com.github.fge.jsonschema.keyword.validator.helpers.NumericValidator
          extended by com.github.fge.jsonschema.keyword.validator.helpers.DivisorValidator
All Implemented Interfaces:
KeywordValidator
Direct Known Subclasses:
DivisibleByValidator, MultipleOfValidator

public abstract class DivisorValidator
extends NumericValidator

Helper keyword validator for draft v4's multipleOf and draft v3's divisibleBy


Field Summary
 
Fields inherited from class com.github.fge.jsonschema.keyword.validator.helpers.NumericValidator
number
 
Fields inherited from class com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
keyword
 
Constructor Summary
protected DivisorValidator(String keyword, JsonNode digest)
           
 
Method Summary
protected  void validateDecimal(ProcessingReport report, MessageBundle bundle, FullData data)
          Method to be implemented by a numeric validator if either of the keyword value or instance value do not fit into a long
protected  void validateLong(ProcessingReport report, MessageBundle bundle, FullData data)
          Method to be implemented by a numeric validator if both the keyword value and instance value fit into a long
 
Methods inherited from class com.github.fge.jsonschema.keyword.validator.helpers.NumericValidator
toString, validate
 
Methods inherited from class com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator
newMsg, newMsg, toArrayNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DivisorValidator

protected DivisorValidator(String keyword,
                           JsonNode digest)
Method Detail

validateLong

protected final void validateLong(ProcessingReport report,
                                  MessageBundle bundle,
                                  FullData data)
                           throws ProcessingException
Description copied from class: NumericValidator
Method to be implemented by a numeric validator if both the keyword value and instance value fit into a long

Specified by:
validateLong in class NumericValidator
Parameters:
report - the validation report
bundle - the message bundle to use
data - the validation data
Throws:
ProcessingException

validateDecimal

protected final void validateDecimal(ProcessingReport report,
                                     MessageBundle bundle,
                                     FullData data)
                              throws ProcessingException
Description copied from class: NumericValidator
Method to be implemented by a numeric validator if either of the keyword value or instance value do not fit into a long

Specified by:
validateDecimal in class NumericValidator
Parameters:
report - the validation report
bundle - the message bundle to use
data - the validation data
Throws:
ProcessingException