Package dev.zemco.codegame.evaluation
Class OutputSinkSatisfiedEvaluationStrategy
java.lang.Object
dev.zemco.codegame.evaluation.OutputSinkSatisfiedEvaluationStrategy
- All Implemented Interfaces:
IEvaluationStrategy
Implementation of the
evaluation strategy that checks if the
output sink in the execution context is satisfied.
This relies on the output sink being satisfied only if all valid values were emitted
during the execution.- Author:
- Erik Zemčík
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluateSolutionForProblemCase(IExecutionContext executionContext, ProblemCase problemCase) Evaluates the solution by checking if theoutput sinkof the execution is satisfied.
-
Constructor Details
-
OutputSinkSatisfiedEvaluationStrategy
public OutputSinkSatisfiedEvaluationStrategy()
-
-
Method Details
-
evaluateSolutionForProblemCase
public boolean evaluateSolutionForProblemCase(IExecutionContext executionContext, ProblemCase problemCase) Evaluates the solution by checking if theoutput sinkof the execution is satisfied.- Specified by:
evaluateSolutionForProblemCasein interfaceIEvaluationStrategy- Parameters:
executionContext- execution context to evaluateproblemCase- problem case to check against, in this implementation ignored- Returns:
- true if
output sinkof the execution is satisfied - Throws:
IllegalArgumentException- ifexecutionContextisnullor ifproblemCaseisnull
-