| Constructor and Description |
|---|
SpringRuleBook(RuleBook<T> ruleBook) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRule(java.lang.Object rule) |
void |
addRule(Rule rule)
Add a Rule.
|
java.util.Optional<Result<T>> |
getResult()
Get the Result of the RuleBook.
|
boolean |
hasRules()
The hasRules() method returns true if any Rules have been defined in the RuleBook.
|
void |
run(NameValueReferableMap facts)
Run the RuleBook given the facts supplied.
|
void |
setDefaultResult(T result)
Set the default Result value; this should be set for RuleBooks that are expected to produce a Result.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefineRulespublic void addRule(java.lang.Object rule)
throws java.io.InvalidClassException
java.io.InvalidClassExceptionpublic void run(NameValueReferableMap facts)
RuleBookpublic void setDefaultResult(T result)
RuleBooksetDefaultResult in interface RuleBook<T>result - the default Result valuepublic java.util.Optional<Result<T>> getResult()
RuleBook