Interface JacksonRequireThat

All Known Subinterfaces:
JacksonValidators
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface JacksonRequireThat
Creates validators for the Jackson API that throw exceptions immediately on validation failure.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends tools.jackson.databind.JsonNode>
    JsonNodeValidator<T>
    requireThat(T value, String name)
    Validates the state of a JsonNode.
  • Method Details

    • requireThat

      <T extends tools.jackson.databind.JsonNode> JsonNodeValidator<T> requireThat(T value, String name)
      Validates the state of a JsonNode.

      The returned validator throws an exception immediately if a validation fails.

      Type Parameters:
      T - the type of the JsonNode
      Parameters:
      value - the value
      name - the name of the value
      Returns:
      a validator for the value
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if name contains whitespace, or is empty