-
public interface EvaluatorAn evaluator interface for applying a JSON schema to a JSON instance.Note that this type is not intended to be used directly by end users.
- Author:
- leadpony
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classEvaluator.ResultThe results of the evaluation done byEvaluator.
-
Field Summary
Fields Modifier and Type Field Description static EvaluatorALWAYS_TRUEThe evaluator which evaluates anything as true.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Evaluator.Resultevaluate(JsonParser.Event event, int depth, ProblemDispatcher dispatcher)Evaluates a JSON schema against each instance location to which it applies.default booleanisAlwaysFalse()Checks whether this evaluator evaluates anything as false or not.
-
-
-
Field Detail
-
ALWAYS_TRUE
static final Evaluator ALWAYS_TRUE
The evaluator which evaluates anything as true.
-
-
Method Detail
-
evaluate
Evaluator.Result evaluate(JsonParser.Event event, int depth, ProblemDispatcher dispatcher)
Evaluates a JSON schema against each instance location to which it applies.- Parameters:
event- the event triggered by the JSON parser, cannot benull.depth- the depth where the event occurred.dispatcher- the dispatcher of the found problems, cannot benull.- Returns:
- the result of the evaluation, one defined in
Evaluator.Result. This cannot benull.
-
isAlwaysFalse
default boolean isAlwaysFalse()
Checks whether this evaluator evaluates anything as false or not. This method returnsfalseby default.- Returns:
trueif this evaluator is always false, otherwisefalse.
-
-