Class MultipleOfValidator

    • Constructor Detail

      • MultipleOfValidator

        public MultipleOfValidator​(SchemaLocation schemaLocation,
                                   com.fasterxml.jackson.databind.JsonNode schemaNode,
                                   Schema parentSchema,
                                   SchemaContext schemaContext)
    • Method Detail

      • validate

        public void validate​(ExecutionContext executionContext,
                             com.fasterxml.jackson.databind.JsonNode node,
                             com.fasterxml.jackson.databind.JsonNode rootNode,
                             NodePath instanceLocation)
        Description copied from interface: Validator
        Validate the instance node which belongs to the instance document at the instance location.
        Specified by:
        validate in interface Validator
        Parameters:
        executionContext - the execution context
        node - the instance node being processed
        rootNode - the instance document that the instance node belongs to
        instanceLocation - the location of the instance node being processed
      • getDivisor

        protected BigDecimal getDivisor​(com.fasterxml.jackson.databind.JsonNode schemaNode)
        Gets the divisor to use.
        Parameters:
        schemaNode - the schema node
        Returns:
        the divisor or null if the input is not correct
      • getDividend

        protected BigDecimal getDividend​(com.fasterxml.jackson.databind.JsonNode node)
        Gets the dividend to use.
        Parameters:
        node - the node
        Returns:
        the dividend or null if the type is incorrect