Class 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 Detail

      • object

        protected java.lang.Object object
        The real fact (object).
      • 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 class java.lang.Object
        Returns:
        The string representation.