|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.rules.Conclusion
public class Conclusion
Base class for conclusions.
Field Summary | |
---|---|
protected java.util.HashMap |
slots
Slots (other facts) belonging to this fact. |
Constructor Summary | |
---|---|
|
Conclusion()
Default constructor |
protected |
Conclusion(java.lang.String pattern)
|
Method Summary | |
---|---|
void |
addDerivation(Derivation derivation)
Adds a derivation to conclusion. |
boolean |
equals(java.lang.Object obj)
|
int |
getCardinality()
|
int |
getDepth()
|
java.util.Set |
getDerivations()
It is possible to come to the same conclusion through multiple inference paths. |
protected java.lang.Object |
getSlot(java.lang.String name)
Returns slot value |
int |
hashCode()
|
boolean |
isDerivedFrom(java.lang.Object fact)
|
boolean |
isNegatedBy(Negator negator)
Returns true if negator negates this conclusion any of its slots or all its derivations. |
void |
mergeDerivations(Conclusion otherConclusion)
Merges derivations of two equal conclusions. |
static boolean |
object2Negator(java.lang.Object o,
Negator n)
Convenience method to properly negate objects taking implementations of Negatable into account. |
protected void |
setSlot(java.lang.String slotName,
java.lang.Object value)
Puts value to a slot. |
boolean |
supercedes(java.lang.Object obj)
One conclusion supercedes another if it is a subclass of the other and slots of the both are equal. |
void |
toDom(org.w3c.dom.Element holder)
|
java.lang.String |
toString()
If pattern is null then outputs class name and list of slots and their values, otherwise formats pattern. |
javax.swing.tree.TreeNode |
toTreeNode(javax.swing.tree.TreeNode parent,
java.lang.String title)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap slots
Constructor Detail |
---|
protected Conclusion(java.lang.String pattern)
pattern
- Pattern to use in toString(). The pattern should use ${slot name
} placeholders.
E.g. Parent conclusion can use pattern "${parent} is parent of ${child}
".public Conclusion()
Method Detail |
---|
protected void setSlot(java.lang.String slotName, java.lang.Object value)
slotName
- value
- public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void mergeDerivations(Conclusion otherConclusion)
otherConclusion
- public boolean supercedes(java.lang.Object obj)
supercedes
in interface Supercedable
conclusion
-
public java.util.Set getDerivations()
public int getCardinality()
public int getDepth()
public void toDom(org.w3c.dom.Element holder)
toDom
in interface biz.hammurapi.xml.dom.DomSerializable
public boolean isNegatedBy(Negator negator)
isNegatedBy
in interface Negatable
negator
-
public void addDerivation(Derivation derivation)
derivation
- protected java.lang.Object getSlot(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public static boolean object2Negator(java.lang.Object o, Negator n)
o
- Object to be negatedn
- Negator
public boolean isDerivedFrom(java.lang.Object fact)
fact
-
public javax.swing.tree.TreeNode toTreeNode(javax.swing.tree.TreeNode parent, java.lang.String title)
toTreeNode
in interface biz.hammurapi.swing.Visualizable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |