Class VirtualFact
- java.lang.Object
-
- jadex.rules.rulesystem.rete.nodes.VirtualFact
-
public class VirtualFact extends java.lang.Object
A virtual fact represents a fact with some specified multislot variable bindings. The values of the virtual fact store the bindings for the sub variables, i.e. [var0] -> {val1, val2, ..}, [var1] -> {val3}, ...
-
-
Field Summary
Fields Modifier and Type Field Description protected OAVAttributeType
attr
The attribute.protected java.lang.Object
object
The real fact (object).protected java.util.List
values
The values of the sub attributes.
-
Constructor Summary
Constructors Constructor Description VirtualFact(java.lang.Object object, OAVAttributeType attr, java.util.List values)
Create a new virtual fact.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OAVAttributeType
getAttribute()
Get the attribute.java.lang.Object
getObject()
Get the real fact.java.lang.Object
getSubAttributeValue(OAVAttributeType attr, int subindex)
Get the value or values of a sub attribute.VirtualFact
getSuperFact()
Get the containing fact.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
object
protected java.lang.Object object
The real fact (object).
-
attr
protected OAVAttributeType attr
The attribute.
-
values
protected java.util.List values
The values of the sub attributes.
-
-
Constructor Detail
-
VirtualFact
public VirtualFact(java.lang.Object object, OAVAttributeType attr, java.util.List values)
Create a new virtual fact.
-
-
Method Detail
-
getObject
public java.lang.Object getObject()
Get the real fact.- Returns:
- The real fact.
-
getAttribute
public OAVAttributeType getAttribute()
Get the attribute.- Returns:
- The attribute.
-
getSuperFact
public VirtualFact getSuperFact()
Get the containing fact.- Returns:
- The containing fact.
-
getSubAttributeValue
public java.lang.Object getSubAttributeValue(OAVAttributeType attr, int subindex)
Get the value or values of a sub attribute. The subindex specifies the variable which should be accessed. Each virtual fact has bindings for every subvariable, i.e. the values contain for each variable its current values.- Parameters:
attr
- The attribute.subindex
- The subindex.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
-