@Test public void test() { FirstApplicableAlg alg = new FirstApplicableAlg(); assertTrue(alg.combine(DecisionType.Indeterminate, DecisionType.Permit) == DecisionType.Indeterminate); assertTrue(alg.combine(DecisionType.NotApplicable, DecisionType.Permit) == DecisionType.Permit); assertTrue(alg.combine(DecisionType.NotApplicable, DecisionType.Indeterminate) == DecisionType.Indeterminate); }
@Override public DecisionType combine(DecisionType op1, DecisionType op2) { if (op1 != DecisionType.NotApplicable) { return op1; } if (op2 != DecisionType.NotApplicable) { return op2; } return DecisionType.NotApplicable; }
FirstApplicableAlg implements CombiningAlgorithm { @Override public DecisionType combine(DecisionType op1, DecisionType op2) { if (op1 != DecisionType.NotApplicable) { return op1; } if (op2 != DecisionType.NotApplicable) { return op2; } return DecisionType.NotApplicable; } }
FirstApplicableAlg implements CombiningAlgorithm { @Override public DecisionType combine(DecisionType op1, DecisionType op2) { if (op1 != DecisionType.NotApplicable) { return op1; } if (op2 != DecisionType.NotApplicable) { return op2; } return DecisionType.NotApplicable; }  }
FirstApplicableAlg implements CombiningAlgorithm { @Override public DecisionType combine(DecisionType op1, DecisionType op2) { if (op1 != DecisionType.NotApplicable) { return op1; } if (op2 != DecisionType.NotApplicable) { return op2; } return DecisionType.NotApplicable; }  @Override DecisionType combine(DecisionType op1, DecisionType op2); }
FirstApplicableAlg implements CombiningAlgorithm { @Override public DecisionType combine(DecisionType op1, DecisionType op2) { if (op1 != DecisionType.NotApplicable) { return op1; } if (op2 != DecisionType.NotApplicable) { return op2; } return DecisionType.NotApplicable; }  @Override DecisionType combine(DecisionType op1, DecisionType op2);  }