@Test public void evaluateBooleanCompoundPredicate(){ CompoundPredicate compoundPredicate = new CompoundPredicate(CompoundPredicate.BooleanOperator.AND, null) .addPredicates(True.INSTANCE, False.INSTANCE); assertEquals(Boolean.FALSE, evaluate(compoundPredicate)); compoundPredicate.setBooleanOperator(CompoundPredicate.BooleanOperator.OR); assertEquals(Boolean.TRUE, evaluate(compoundPredicate)); compoundPredicate.setBooleanOperator(CompoundPredicate.BooleanOperator.XOR); assertEquals(Boolean.TRUE, evaluate(compoundPredicate)); }
static public Boolean evaluate(Predicate predicate, EvaluationContext context){ try { return evaluatePredicate(predicate, context); } catch(PMMLException pe){ throw pe.ensureContext(predicate); } }
PredicateUtil { static public Boolean evaluate(Predicate predicate, EvaluationContext context){ try { return evaluatePredicate(predicate, context); } catch(PMMLException pe){ throw pe.ensureContext(predicate); } } }
PredicateUtil { static public Boolean evaluate(Predicate predicate, EvaluationContext context){ try { return evaluatePredicate(predicate, context); } catch(PMMLException pe){ throw pe.ensureContext(predicate); } } private  PredicateUtil(); }
PredicateUtil { static public Boolean evaluate(Predicate predicate, EvaluationContext context){ try { return evaluatePredicate(predicate, context); } catch(PMMLException pe){ throw pe.ensureContext(predicate); } } private  PredicateUtil(); static Predicate ensurePredicate(E hasPredicate); static Boolean evaluatePredicateContainer(E hasPredicate, EvaluationContext context); static Boolean evaluate(Predicate predicate, EvaluationContext context); static Boolean evaluateSimplePredicate(SimplePredicate simplePredicate, EvaluationContext context); static Boolean evaluateSimpleSetPredicate(SimpleSetPredicate simpleSetPredicate, EvaluationContext context); static Boolean evaluateCompoundPredicate(CompoundPredicate compoundPredicate, EvaluationContext context); static CompoundPredicateResult evaluateCompoundPredicateInternal(CompoundPredicate compoundPredicate, EvaluationContext context); static Boolean evaluateTrue(True truePredicate); static Boolean evaluateFalse(False falsePredicate); static Boolean evaluateJavaPredicate(JavaPredicate javaPredicate, EvaluationContext context); static Boolean binaryAnd(Boolean left, Boolean right); static Boolean binaryOr(Boolean left, Boolean right); static Boolean binaryXor(Boolean left, Boolean right); }
PredicateUtil { static public Boolean evaluate(Predicate predicate, EvaluationContext context){ try { return evaluatePredicate(predicate, context); } catch(PMMLException pe){ throw pe.ensureContext(predicate); } } private  PredicateUtil(); static Predicate ensurePredicate(E hasPredicate); static Boolean evaluatePredicateContainer(E hasPredicate, EvaluationContext context); static Boolean evaluate(Predicate predicate, EvaluationContext context); static Boolean evaluateSimplePredicate(SimplePredicate simplePredicate, EvaluationContext context); static Boolean evaluateSimpleSetPredicate(SimpleSetPredicate simpleSetPredicate, EvaluationContext context); static Boolean evaluateCompoundPredicate(CompoundPredicate compoundPredicate, EvaluationContext context); static CompoundPredicateResult evaluateCompoundPredicateInternal(CompoundPredicate compoundPredicate, EvaluationContext context); static Boolean evaluateTrue(True truePredicate); static Boolean evaluateFalse(False falsePredicate); static Boolean evaluateJavaPredicate(JavaPredicate javaPredicate, EvaluationContext context); static Boolean binaryAnd(Boolean left, Boolean right); static Boolean binaryOr(Boolean left, Boolean right); static Boolean binaryXor(Boolean left, Boolean right);  }