public class Explanation extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCause(ICause cause)
Add a cause, which explains, partially, the situation
|
void |
addCausesAndDecisions(Explanation explanation)
Merge all causes and decisions from
explanation in this. |
void |
addDecision(Decision decision)
Add a decision, which explains, partially, the situation
|
void |
addRules(Rules someRules)
Merge 'someRules' into this rules
|
Set<ICause> |
getCauses() |
BitSet |
getDecisions() |
int |
getEvtstrIdx()
Get the event store idx at which the last analysis ends
|
Rules |
getRules()
Return the rules, may be null
|
boolean |
isComplete() |
int |
nbCauses()
Return the number of causes explaining the situation
|
int |
nbDecisions()
Return the number of decisions explaining the situation
|
void |
recycle()
Recycle this explanation when it is not used anymore.
|
void |
remove(Decision decision)
Remove one decision from the set of decisions explaining the situation
|
boolean |
remove(ICause cause)
Remove one cause from the set of causes explaining the situation
|
void |
setEvtstrIdx(int evtstrIdx)
Set the event store idx, where the last analysis ends
|
String |
toString() |
public boolean addCause(ICause cause)
cause - a causepublic void addDecision(Decision decision)
decision - a decisionpublic int nbCauses()
public int nbDecisions()
public void addCausesAndDecisions(Explanation explanation)
explanation in this.explanation - a given explanationpublic void addRules(Rules someRules)
someRules - the rules to addpublic boolean remove(ICause cause)
cause - a cause to removepublic void remove(Decision decision)
decision - a decision to removepublic BitSet getDecisions()
public boolean isComplete()
public int getEvtstrIdx()
public void setEvtstrIdx(int evtstrIdx)
evtstrIdx - an event store indexpublic Rules getRules()
public void recycle()
Copyright © 2017. All rights reserved.