public class RuleAdapter extends StandardDecision
| Constructor and Description |
|---|
RuleAdapter(java.lang.Object ruleObj)
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getThen()
Method getThen() returns the 'then' action to be used; either a
Function object or a
BiFunction object. |
java.util.function.Predicate |
getWhen()
Method getWhen() gets the
Predicate that evaluates the condition of the Rule. |
RuleAdapter |
given(Fact... facts)
The given() method accepts Facts for the StandardDecision.
|
RuleAdapter |
given(FactMap facts)
The given() method accepts Facts for the StandardDecision.
|
RuleAdapter |
given(java.util.List list)
The given() method accepts Facts for the StandardDecision.
|
create, create, getFactMap, getResult, run, setNextRule, setResult, then, then, whenpublic RuleAdapter(java.lang.Object ruleObj)
throws java.io.InvalidClassException
ruleObj - an annotated POJO to be adapted to a rulejava.io.InvalidClassException - if the POJO does not have the @Rule annotationpublic RuleAdapter given(Fact... facts)
StandardDecisiongiven in interface Rulegiven in class StandardDecisionfacts - Facts to be used by the Rulepublic RuleAdapter given(java.util.List list)
StandardDecisiongiven in interface Rulegiven in class StandardDecisionlist - a List of Facts to be used by the Rulepublic RuleAdapter given(FactMap facts)
StandardDecisiongiven in interface Rulegiven in class StandardDecisionfacts - a FactMappublic java.util.function.Predicate getWhen()
RulePredicate that evaluates the condition of the Rule.getWhen in interface RulegetWhen in class StandardDecisionpublic java.lang.Object getThen()
Function object or a
BiFunction object. If no action was specified then a default Function object that returns
RuleState NEXT is used.getThen in interface RulegetThen in class StandardDecision