Package com.networknt.schema.annotation
Class JsonNodeAnnotationPredicate
- java.lang.Object
-
- com.networknt.schema.annotation.JsonNodeAnnotationPredicate
-
- All Implemented Interfaces:
java.util.function.Predicate<JsonNodeAnnotation>
public class JsonNodeAnnotationPredicate extends java.lang.Object implements java.util.function.Predicate<JsonNodeAnnotation>
A predicate for filtering annotations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonNodeAnnotationPredicate.Builder
Builder for building aJsonNodeAnnotationPredicate
.
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.function.Predicate<JsonNodePath>
evaluationPathPredicate
(package private) java.util.function.Predicate<JsonNodePath>
instanceLocationPredicate
(package private) java.util.function.Predicate<java.lang.String>
keywordPredicate
(package private) java.util.function.Predicate<SchemaLocation>
schemaLocationPredicate
(package private) java.util.function.Predicate<java.lang.Object>
valuePredicate
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsonNodeAnnotationPredicate(java.util.function.Predicate<JsonNodePath> instanceLocationPredicate, java.util.function.Predicate<JsonNodePath> evaluationPathPredicate, java.util.function.Predicate<SchemaLocation> schemaLocationPredicate, java.util.function.Predicate<java.lang.String> keywordPredicate, java.util.function.Predicate<java.lang.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.Builder
builder()
Creates a new builder to create the predicate.java.util.function.Predicate<JsonNodePath>
getEvaluationPathPredicate()
Gets the predicate to filter on evaluationPath.java.util.function.Predicate<JsonNodePath>
getInstanceLocationPredicate()
Gets the predicate to filter on instanceLocation.java.util.function.Predicate<java.lang.String>
getKeywordPredicate()
Gets the predicate to filter on keyword.java.util.function.Predicate<SchemaLocation>
getSchemaLocationPredicate()
Gets the predicate to filter on schemaLocation.java.util.function.Predicate<java.lang.Object>
getValuePredicate()
Gets the predicate to filter on value.boolean
test(JsonNodeAnnotation t)
-
-
-
Field Detail
-
instanceLocationPredicate
final java.util.function.Predicate<JsonNodePath> instanceLocationPredicate
-
evaluationPathPredicate
final java.util.function.Predicate<JsonNodePath> evaluationPathPredicate
-
schemaLocationPredicate
final java.util.function.Predicate<SchemaLocation> schemaLocationPredicate
-
keywordPredicate
final java.util.function.Predicate<java.lang.String> keywordPredicate
-
valuePredicate
final java.util.function.Predicate<java.lang.Object> valuePredicate
-
-
Constructor Detail
-
JsonNodeAnnotationPredicate
protected JsonNodeAnnotationPredicate(java.util.function.Predicate<JsonNodePath> instanceLocationPredicate, java.util.function.Predicate<JsonNodePath> evaluationPathPredicate, java.util.function.Predicate<SchemaLocation> schemaLocationPredicate, java.util.function.Predicate<java.lang.String> keywordPredicate, java.util.function.Predicate<java.lang.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:
test
in interfacejava.util.function.Predicate<JsonNodeAnnotation>
-
getInstanceLocationPredicate
public java.util.function.Predicate<JsonNodePath> getInstanceLocationPredicate()
Gets the predicate to filter on instanceLocation.- Returns:
- the predicate
-
getEvaluationPathPredicate
public java.util.function.Predicate<JsonNodePath> getEvaluationPathPredicate()
Gets the predicate to filter on evaluationPath.- Returns:
- the predicate
-
getSchemaLocationPredicate
public java.util.function.Predicate<SchemaLocation> getSchemaLocationPredicate()
Gets the predicate to filter on schemaLocation.- Returns:
- the predicate
-
getKeywordPredicate
public java.util.function.Predicate<java.lang.String> getKeywordPredicate()
Gets the predicate to filter on keyword.- Returns:
- the predicate
-
getValuePredicate
public java.util.function.Predicate<java.lang.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
-
-