Class JsonNodeAnnotationPredicate

java.lang.Object
com.networknt.schema.annotation.JsonNodeAnnotationPredicate
All Implemented Interfaces:
Predicate<JsonNodeAnnotation>

public class JsonNodeAnnotationPredicate extends Object implements Predicate<JsonNodeAnnotation>
A predicate for filtering annotations.
  • Constructor Details

    • JsonNodeAnnotationPredicate

      protected JsonNodeAnnotationPredicate(Predicate<JsonNodePath> instanceLocationPredicate, Predicate<JsonNodePath> evaluationPathPredicate, Predicate<SchemaLocation> schemaLocationPredicate, Predicate<String> keywordPredicate, Predicate<Object> valuePredicate)
      Initialize a new instance of this class.
      Parameters:
      instanceLocationPredicate - for instanceLocation
      evaluationPathPredicate - for evaluationPath
      schemaLocationPredicate - for schemaLocation
      keywordPredicate - for keyword
      valuePredicate - for value
  • Method Details

    • test

      public boolean test(JsonNodeAnnotation t)
      Specified by:
      test in interface Predicate<JsonNodeAnnotation>
    • getInstanceLocationPredicate

      public Predicate<JsonNodePath> getInstanceLocationPredicate()
      Gets the predicate to filter on instanceLocation.
      Returns:
      the predicate
    • getEvaluationPathPredicate

      public Predicate<JsonNodePath> getEvaluationPathPredicate()
      Gets the predicate to filter on evaluationPath.
      Returns:
      the predicate
    • getSchemaLocationPredicate

      public Predicate<SchemaLocation> getSchemaLocationPredicate()
      Gets the predicate to filter on schemaLocation.
      Returns:
      the predicate
    • getKeywordPredicate

      public Predicate<String> getKeywordPredicate()
      Gets the predicate to filter on keyword.
      Returns:
      the predicate
    • getValuePredicate

      public Predicate<Object> getValuePredicate()
      Gets the predicate to filter on value.
      Returns:
      the predicate
    • builder

      public static JsonNodeAnnotationPredicate.Builder builder()
      Creates a new builder to create the predicate.
      Returns:
      the builder