mml-commons.8.44.0.Final.source-code.KiePMMLSimpleSetPredicateEvaluateMethodTemplate.tmpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-pmml-commons Show documentation
Show all versions of kie-pmml-commons Show documentation
Common code for PMML module
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