Package com.networknt.schema.annotation
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonNodeAnnotationPredicate.BuilderBuilder for building aJsonNodeAnnotationPredicate.
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonNodeAnnotationPredicate(Predicate<JsonNodePath> instanceLocationPredicate, Predicate<JsonNodePath> evaluationPathPredicate, Predicate<SchemaLocation> schemaLocationPredicate, Predicate<String> keywordPredicate, Predicate<Object> valuePredicate)Initialize a new instance of this class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonNodeAnnotationPredicate.Builderbuilder()Creates a new builder to create the predicate.Predicate<JsonNodePath>getEvaluationPathPredicate()Gets the predicate to filter on evaluationPath.Predicate<JsonNodePath>getInstanceLocationPredicate()Gets the predicate to filter on instanceLocation.Predicate<String>getKeywordPredicate()Gets the predicate to filter on keyword.Predicate<SchemaLocation>getSchemaLocationPredicate()Gets the predicate to filter on schemaLocation.Predicate<Object>getValuePredicate()Gets the predicate to filter on value.booleantest(JsonNodeAnnotation t)
-
-
-
Constructor Detail
-
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 instanceLocationevaluationPathPredicate- for evaluationPathschemaLocationPredicate- for schemaLocationkeywordPredicate- for keywordvaluePredicate- for value
-
-
Method Detail
-
test
public boolean test(JsonNodeAnnotation t)
- Specified by:
testin interfacePredicate<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
-
-