public class ThenRuleBuilder<T,U> extends java.lang.Object implements TerminatingRuleBuilder<T,U>
Modifier and Type | Method and Description |
---|---|
Rule<T,U> |
build()
Builds the Rule.
|
TerminatingRuleBuilder<T,U> |
stop()
Sends a signal that the rule chain should be broken.
|
ThenRuleBuilder<T,U> |
then(java.util.function.BiConsumer<NameValueReferableTypeConvertibleMap<T>,Result<U>> action)
Addds a then action into the Rule.
|
ThenRuleBuilder<T,U> |
then(java.util.function.Consumer<NameValueReferableTypeConvertibleMap<T>> action)
Adds a then action into the Rule.
|
UsingRuleBuilder<T,U> |
using(java.lang.String... factNames)
Adds a using constraint in the Rule that restricts the facts supplied to the subsequent 'then' action.
|
public UsingRuleBuilder<T,U> using(java.lang.String... factNames)
factNames
- the fact names to be supplied to the subsequent 'then' actionpublic ThenRuleBuilder<T,U> then(java.util.function.Consumer<NameValueReferableTypeConvertibleMap<T>> action)
action
- an action that the rule will execute based on the conditionpublic ThenRuleBuilder<T,U> then(java.util.function.BiConsumer<NameValueReferableTypeConvertibleMap<T>,Result<U>> action)
action
- an action that the rule will execute based on the condition; accepts facts and the resultpublic TerminatingRuleBuilder<T,U> stop()