Package de.telekom.jsonfilter.operator
Class EvaluationResult
java.lang.Object
de.telekom.jsonfilter.operator.EvaluationResult
-
Method Summary
Modifier and TypeMethodDescriptionstatic EvaluationResultempty()Creates an EvaluationResult instance indicating no operation.static EvaluationResultfromResultList(LogicOperator logicOperator, List<EvaluationResult> evaluationResults) Creates an EvaluationResult instance based on the results of an evaluation process.toString()static EvaluationResultCreates a valid EvaluationResult instance based on the given Operator.static EvaluationResultvalid(Operator op, List<EvaluationResult> evaluationResults) Creates a valid EvaluationResult instance based on the given Operator and other evaluation results.static EvaluationResultCreates an EvaluationResult instance indicating an error in the evaluation process.
-
Method Details
-
empty
Creates an EvaluationResult instance indicating no operation.- Returns:
- EvaluationResult the created evaluation result, with default values and "noop" operator name.
-
valid
Creates a valid EvaluationResult instance based on the given Operator.- Parameters:
op- the operator for this evaluation.- Returns:
- EvaluationResult the created evaluation result, which is valid by default.
-
valid
Creates a valid EvaluationResult instance based on the given Operator and other evaluation results.- Parameters:
op- the operator for this evaluation.evaluationResults- the list of evaluation results for child operators.- Returns:
- EvaluationResult the created evaluation result, which is valid by default.
-
withError
Creates an EvaluationResult instance indicating an error in the evaluation process.- Parameters:
rootCause- the operator that caused the error.causeDescription- the description of the error.- Returns:
- EvaluationResult the created evaluation result, which is not valid by default.
-
fromResultList
public static EvaluationResult fromResultList(LogicOperator logicOperator, List<EvaluationResult> evaluationResults) Creates an EvaluationResult instance based on the results of an evaluation process.- Parameters:
logicOperator- the operator for this evaluation.evaluationResults- the list of evaluation results for child operators.- Returns:
- EvaluationResult the created evaluation result, which is valid if all/any child evaluations are valid.
-
toString
-