All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mml-commons.8.44.0.Final.source-code.KiePMMLCompoundPredicateEvaluateMethodTemplate.tmpl Maven / Gradle / Ivy

There is a newer version: 10.0.0
Show newest version
package org.kie.pmml.commons.model.predicates;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;


public class KiePMMLCompoundPredicateEvaluateMethodTemplate {

    public boolean evaluate(Map stringObjectMap) {
           Boolean toReturn = null;
           final List, Boolean>> functions = new LinkedList();
           for (Function, Boolean> function : functions) {
                       Boolean evaluation = function.apply(stringObjectMap);
                       toReturn = null; // generated
           }
           return toReturn != null && toReturn;
       }

    private boolean evaluateOR() {
        return toReturn != null ? toReturn || evaluation : evaluation;
    }

    private boolean evaluateAND() {
       return toReturn != null ? toReturn && evaluation : evaluation;
    }

    private boolean evaluateXOR() {
       return toReturn != null ? toReturn ^ evaluation : evaluation;
    }

    private boolean evaluateSURROGATE() {
       return toReturn != null ? toReturn : evaluation;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy