@Deprecated public interface Decision<T,U> extends Rule<T>
Modifier and Type | Method and Description |
---|---|
U |
getResult()
Deprecated.
The
getResult() method returns the stored result from the Decision
The value may be null. |
Decision<T,U> |
given(Fact<T>... facts)
Deprecated.
The given() method sets the Facts to be used by the Rule.
|
Decision<T,U> |
given(FactMap<T> facts)
Deprecated.
The given() method sets the Facts to be used by the Rule.
|
Decision<T,U> |
given(java.util.List<Fact<T>> facts)
Deprecated.
The given() method sets the Facts to be used by the Rule.
|
Decision<T,U> |
given(java.lang.String name,
T value)
Deprecated.
The given() method sets the Facts to be used by the Rule.
|
Decision<T,U> |
givenUnTyped(FactMap facts)
Deprecated.
The givenUnTyped method sets an untyped FactMap.
|
void |
setResult(Result<U> result)
Deprecated.
The
setResult() method initializes the stored result; useful for aggregation/chaining of a result. |
Decision<T,U> |
stop()
Deprecated.
Stops the rule chain after the then() method executes.
Note: this will only happen if the when() condition evaluates to true. |
Decision<T,U> |
then(java.util.function.BiConsumer<FactMap<T>,Result<U>> action)
Deprecated.
The then method specifies the action taken if
when() evaluates to true. |
Decision<T,U> |
then(java.util.function.Consumer<FactMap<T>> action)
Deprecated.
The then() method performs some action based on facts.
This then() method does not imply a return value, only that the next chained then() is executed. |
Decision<T,U> |
using(java.lang.String... factName)
Deprecated.
The using() method reduces the Facts used by the then() method to only the value of the Fact specified
by the factName.
|
Decision<T,U> |
when(java.util.function.Predicate<FactMap<T>> test)
Deprecated.
The when() method takes in a
Predicate that evaluates the facts against a condition. |
getFactMap, getThen, getWhen, run, run, setNextRule
Decision<T,U> given(java.lang.String name, T value)
Rule
Decision<T,U> given(Fact<T>... facts)
Rule
Decision<T,U> given(java.util.List<Fact<T>> facts)
Rule
Decision<T,U> given(FactMap<T> facts)
Rule
Decision<T,U> givenUnTyped(FactMap facts)
Rule
givenUnTyped
in interface Rule<T>
facts
- a FactMap
Decision<T,U> when(java.util.function.Predicate<FactMap<T>> test)
Rule
Predicate
that evaluates the facts against a condition.Decision<T,U> then(java.util.function.Consumer<FactMap<T>> action)
Rule
Decision<T,U> then(java.util.function.BiConsumer<FactMap<T>,Result<U>> action)
when()
evaluates to true.
The execution of this 'then' takes precedence over then(Function)
if both exist.action
- the action to be performedRule
objectDecision<T,U> using(java.lang.String... factName)
Rule
Decision<T,U> stop()
Rule
U getResult()
getResult()
method returns the stored result from the Decision
The value may be null.