public class ConditionalRuleGroup extends CompositeRule
rulesdescription, name, priorityDEFAULT_DESCRIPTION, DEFAULT_NAME, DEFAULT_PRIORITY| Constructor and Description |
|---|
ConditionalRuleGroup()
Create a conditional rule group.
|
ConditionalRuleGroup(java.lang.String name)
Create a conditional rule group.
|
ConditionalRuleGroup(java.lang.String name,
java.lang.String description)
Create a conditional rule group.
|
ConditionalRuleGroup(java.lang.String name,
java.lang.String description,
int priority)
Create a conditional rule group.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Facts facts)
A conditional rule group will trigger all its composing rules if the condition
of the rule with highest priority evaluates to true.
|
void |
execute(Facts facts)
When a conditional rule group is executed, all rules that evaluated to true
are performed in their natural order, but with the conditional rule
(the one with the highest priority) first.
|
addRule, removeRulecompareTo, equals, getDescription, getName, getPriority, hashCode, setDescription, setPriority, toStringpublic ConditionalRuleGroup()
public ConditionalRuleGroup(java.lang.String name)
name - of the conditional rulepublic ConditionalRuleGroup(java.lang.String name,
java.lang.String description)
name - of the conditional ruledescription - of the conditional rulepublic ConditionalRuleGroup(java.lang.String name,
java.lang.String description,
int priority)
name - of the conditional ruledescription - of the conditional rulepriority - of the composite rulepublic boolean evaluate(Facts facts)
evaluate in interface Ruleevaluate in class CompositeRulefacts - The facts.public void execute(Facts facts) throws java.lang.Exception
execute in interface Ruleexecute in class CompositeRulefacts - The facts.java.lang.Exception - thrown if an exception occurs during actions performingCopyright © 2020. All Rights Reserved.