Constructor and Description |
---|
CoRRuleBook() |
Modifier and Type | Method and Description |
---|---|
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, wait
defineRules
public void run(NameValueReferableMap facts)
RuleBook
public void setDefaultResult(T result)
RuleBook
setDefaultResult
in interface RuleBook<T>
result
- the default Result valuepublic java.util.Optional<Result<T>> getResult()
RuleBook