ScoreAttainedTermination termination = new ScoreAttainedTermination();
termination.setScoreAttained(scoreDefinition.parseScore(scoreAttained));
terminationList.add(termination);
}
if (maximumUnimprovedStepCount != null) {
UnimprovedStepCountTermination termination = new UnimprovedStepCountTermination();
termination.setMaximumUnimprovedStepCount(maximumUnimprovedStepCount);
terminationList.add(termination);
}
if (terminationConfigList != null && terminationConfigList.isEmpty()) {
for (TerminationConfig terminationConfig : terminationConfigList) {
Termination termination = terminationConfig.buildTermination(scoreDefinition);