@Test public void evaluateIntIn() { ARRAY_TYPE arrayType = ARRAY_TYPE.INT; List<Object> values = getObjects(arrayType, 4); KiePMMLSimpleSetPredicate kiePMMLSimpleSetPredicate = getKiePMMLSimpleSetPredicate(values, arrayType, IN_NOTIN.IN); Map<String, Object> inputData = new HashMap<>(); inputData.put("FAKE", "234"); assertFalse(kiePMMLSimpleSetPredicate.evaluate(inputData)); inputData.put(SIMPLE_SET_PREDICATE_NAME, "432"); assertFalse(kiePMMLSimpleSetPredicate.evaluate(inputData)); inputData.put(SIMPLE_SET_PREDICATE_NAME, values.get(0)); assertTrue(kiePMMLSimpleSetPredicate.evaluate(inputData)); }
@Override public boolean evaluate(Map<String, Object> values) { boolean toReturn = false; if (values.containsKey(name)) { logger.debug("found matching parameter, evaluating... "); toReturn = evaluation(values.get(name)); } return toReturn; }
KiePMMLSimpleSetPredicate extends KiePMMLPredicate { @Override public boolean evaluate(Map<String, Object> values) { boolean toReturn = false; if (values.containsKey(name)) { logger.debug("found matching parameter, evaluating... "); toReturn = evaluation(values.get(name)); } return toReturn; } }
KiePMMLSimpleSetPredicate extends KiePMMLPredicate { @Override public boolean evaluate(Map<String, Object> values) { boolean toReturn = false; if (values.containsKey(name)) { logger.debug("found matching parameter, evaluating... "); toReturn = evaluation(values.get(name)); } return toReturn; } protected  KiePMMLSimpleSetPredicate(final String name, final List<KiePMMLExtension> extensions, final ARRAY_TYPE arrayType, final IN_NOTIN inNotIn); }
KiePMMLSimpleSetPredicate extends KiePMMLPredicate { @Override public boolean evaluate(Map<String, Object> values) { boolean toReturn = false; if (values.containsKey(name)) { logger.debug("found matching parameter, evaluating... "); toReturn = evaluation(values.get(name)); } return toReturn; } protected  KiePMMLSimpleSetPredicate(final String name, final List<KiePMMLExtension> extensions, final ARRAY_TYPE arrayType, final IN_NOTIN inNotIn); static Builder builder(final String name, final List<KiePMMLExtension> extensions, final ARRAY_TYPE arrayType, final IN_NOTIN inNotIn); @Override boolean evaluate(Map<String, Object> values); @Override String getName(); List<Object> getValues(); ARRAY_TYPE getArrayType(); IN_NOTIN getInNotIn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
KiePMMLSimpleSetPredicate extends KiePMMLPredicate { @Override public boolean evaluate(Map<String, Object> values) { boolean toReturn = false; if (values.containsKey(name)) { logger.debug("found matching parameter, evaluating... "); toReturn = evaluation(values.get(name)); } return toReturn; } protected  KiePMMLSimpleSetPredicate(final String name, final List<KiePMMLExtension> extensions, final ARRAY_TYPE arrayType, final IN_NOTIN inNotIn); static Builder builder(final String name, final List<KiePMMLExtension> extensions, final ARRAY_TYPE arrayType, final IN_NOTIN inNotIn); @Override boolean evaluate(Map<String, Object> values); @Override String getName(); List<Object> getValues(); ARRAY_TYPE getArrayType(); IN_NOTIN getInNotIn(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }