Class PastEventCondition

    • Field Detail

      • _subject

        protected Symbol _subject
      • _action

        protected Symbol _action
      • _target

        protected Symbol _target
      • _parameters

        protected java.util.ArrayList<Symbol> _parameters
      • _type

        protected short _type
      • _status

        protected short _status
    • Constructor Detail

      • PastEventCondition

        protected PastEventCondition()
      • PastEventCondition

        public PastEventCondition​(boolean occurred,
                                  short type,
                                  short status,
                                  Symbol subject,
                                  Symbol action,
                                  Symbol target,
                                  java.util.ArrayList<Symbol> parameters)
      • PastEventCondition

        public PastEventCondition​(boolean occurred,
                                  Event e)
      • PastEventCondition

        public PastEventCondition​(boolean occurred,
                                  short type,
                                  short status,
                                  Name event)
    • Method Detail

      • ParseEvent

        public static PastEventCondition ParseEvent​(org.xml.sax.Attributes attributes)
        Parses a RecentEventCondition given a XML attribute list
        Parameters:
        attributes - - A list of XMl attributes
        Returns:
        - the EventCondition Parsed
      • clone

        public java.lang.Object clone()
        Description copied from class: PredicateCondition
        Clones this Predicate, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
        Overrides:
        clone in class PredicateCondition
        Returns:
        The Predicates's copy.
      • isGrounded

        public boolean isGrounded()
        Description copied from class: Condition
        Indicates if the Predicate is grounded (no unbound variables in it's WFN) Example: Stronger(Luke,John) is grounded while Stronger(John,[X]) is not.
        Specified by:
        isGrounded in interface IGroundable
        Overrides:
        isGrounded in class Condition
        Returns:
        true if the Predicate is grounded, false otherwise
      • ReplaceUnboundVariables

        public void ReplaceUnboundVariables​(int variableID)
        Description copied from class: Condition
        Replaces all unbound variables in the object by applying a numeric identifier to each one. For example, the variable [x] becomes [x4] if the received ID is 4. Attention, this method modifies the original object.
        Specified by:
        ReplaceUnboundVariables in interface IGroundable
        Overrides:
        ReplaceUnboundVariables in class Condition
        Parameters:
        variableID - - the identifier to be applied
      • MakeGround

        public void MakeGround​(java.util.ArrayList<Substitution> bindings)
        Description copied from class: Condition
        Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.
        Specified by:
        MakeGround in interface IGroundable
        Overrides:
        MakeGround in class Condition
        Parameters:
        bindings - - A list of substitutions of the type "[Variable]/value"
        See Also:
        Substitution
      • MakeGround

        public void MakeGround​(Substitution subst)
        Description copied from class: Condition
        Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.
        Specified by:
        MakeGround in interface IGroundable
        Overrides:
        MakeGround in class Condition
        Parameters:
        subst - - a substitution of the type "[Variable]/value"
        See Also:
        Substitution
      • GetValidBindings

        public java.util.ArrayList<SubstitutionSet> GetValidBindings​(AgentModel am)
        This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's AutobiographicalMemory
        Overrides:
        GetValidBindings in class Condition
        Returns:
        A list with all SubstitutionsSets that make the condition valid
        See Also:
        AutobiographicalMemory
      • GetSearchKeys

        protected java.util.ArrayList<SearchKey> GetSearchKeys()