Package com.networknt.schema.annotation
Class AnnotationPredicate
- java.lang.Object
-
- com.networknt.schema.annotation.AnnotationPredicate
-
- All Implemented Interfaces:
Predicate<Annotation>
public class AnnotationPredicate extends Object implements Predicate<Annotation>
A predicate for filtering annotations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotationPredicate.BuilderBuilder for building aAnnotationPredicate.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotationPredicate(Predicate<NodePath> instanceLocationPredicate, Predicate<NodePath> 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 AnnotationPredicate.Builderbuilder()Creates a new builder to create the predicate.Predicate<NodePath>getEvaluationPathPredicate()Gets the predicate to filter on evaluationPath.Predicate<NodePath>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(Annotation t)
-
-
-
Constructor Detail
-
AnnotationPredicate
protected AnnotationPredicate(Predicate<NodePath> instanceLocationPredicate, Predicate<NodePath> 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(Annotation t)
- Specified by:
testin interfacePredicate<Annotation>
-
getInstanceLocationPredicate
public Predicate<NodePath> getInstanceLocationPredicate()
Gets the predicate to filter on instanceLocation.- Returns:
- the predicate
-
getEvaluationPathPredicate
public Predicate<NodePath> 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 AnnotationPredicate.Builder builder()
Creates a new builder to create the predicate.- Returns:
- the builder
-
-