public class GivenRuleBuilder<T,U>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
GivenRuleBuilder<T,U> |
given(NameValueReferable... facts)
Adds one or more facts into the Rule.
|
GivenRuleBuilder<T,U> |
given(NameValueReferableMap facts)
Adds one or more facts into the Rule using a
NameValueReferableMap . |
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.
|
WhenRuleBuilder<T,U> |
when(java.util.function.Predicate<NameValueReferableTypeConvertibleMap<T>> condition)
Adds the condition for the Rule.
|
public final GivenRuleBuilder<T,U> given(NameValueReferableMap facts)
NameValueReferableMap
.facts
- the facts to be added to the Rule@SafeVarargs public final GivenRuleBuilder<T,U> given(NameValueReferable... facts)
facts
- one or more factspublic WhenRuleBuilder<T,U> when(java.util.function.Predicate<NameValueReferableTypeConvertibleMap<T>> condition)
condition
- the condition specified for the Rulepublic 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 result