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

mml-commons.8.44.0.Final.source-code.KiePMMLSimpleSetPredicateEvaluateMethodTemplate.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 KiePMMLSimpleSetPredicateEvaluateMethodTemplate {

    private boolean evaluateIN(Map stringObjectMap) {
        org.kie.pmml.api.enums.ARRAY_TYPE arrayType = null;
        if (!stringObjectMap.containsKey("avalue")) {
            return false;
        }
        final String stringValue = (String) org.kie.pmml.api.utils.ConverterTypeUtil.convert(String.class, stringObjectMap.get("avalue"));
        final Object value = arrayType.getValue(stringValue);
        final List values = java.util.Arrays.asList();
        return values.contains(value);
    }

    private boolean evaluateNOT_IN(Map stringObjectMap) {
        org.kie.pmml.api.enums.ARRAY_TYPE arrayType = null;
        if (!stringObjectMap.containsKey("avalue")) {
                    return false;
        }
        final String stringValue = (String) org.kie.pmml.api.utils.ConverterTypeUtil.convert(String.class, stringObjectMap.get("avalue"));
        final Object value = arrayType.getValue(stringValue);
        final List values = java.util.Arrays.asList();
        return !values.contains(value);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy