Package FAtiMA.Core.conditions
Class PastEventCondition
java.lang.Object
FAtiMA.Core.conditions.Condition
FAtiMA.Core.conditions.PredicateCondition
FAtiMA.Core.conditions.PastEventCondition
- All Implemented Interfaces:
IGroundable,Serializable,Cloneable
- Direct Known Subclasses:
RecentEventCondition
- Author:
- User
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPastEventCondition(boolean occurred, short type, short status, Name event) PastEventCondition(boolean occurred, short type, short status, Symbol subject, Symbol action, Symbol target, ArrayList<Symbol> parameters) PastEventCondition(boolean occurred, Event e) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the EventCondition is verified in the agent's AutobiographicalMemoryclone()Clones this Predicate, returning an equal copy.protected ArrayList<ActionDetail>This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's AutobiographicalMemorybooleanIndicates if the Predicate is grounded (no unbound variables in it's WFN) Example: Stronger(Luke,John) is grounded while Stronger(John,[X]) is not.voidMakeGround(Substitution subst) Applies a set of substitutions to the object, grounding it.voidMakeGround(ArrayList<Substitution> bindings) Applies a set of substitutions to the object, grounding it.static PastEventConditionParseEvent(Attributes attributes) Parses a RecentEventCondition given a XML attribute listvoidReplaceUnboundVariables(int variableID) Replaces all unbound variables in the object by applying a numeric identifier to each one.Methods inherited from class FAtiMA.Core.conditions.PredicateCondition
getPositive, GetValue, GetValueBindings, isPositive, ParsePredicate, setPositive, toStringMethods inherited from class FAtiMA.Core.conditions.Condition
CheckActivation, getName, getToM, hasChangedVerifiability, isVerifiable, setName, setToM, setVerifiable
-
Field Details
-
_subject
-
_action
-
_target
-
_parameters
-
_type
protected short _type -
_status
protected short _status
-
-
Constructor Details
-
PastEventCondition
protected PastEventCondition() -
PastEventCondition
-
PastEventCondition
-
PastEventCondition
-
PastEventCondition
-
-
Method Details
-
ParseEvent
Parses a RecentEventCondition given a XML attribute list- Parameters:
attributes- - A list of XMl attributes- Returns:
- - the EventCondition Parsed
-
clone
Description copied from class:PredicateConditionClones this Predicate, returning an equal copy. If this clone is changed afterwards, the original object remains the same.- Overrides:
clonein classPredicateCondition- Returns:
- The Predicates's copy.
-
isGrounded
public boolean isGrounded()Description copied from class:ConditionIndicates 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:
isGroundedin interfaceIGroundable- Overrides:
isGroundedin classCondition- Returns:
- true if the Predicate is grounded, false otherwise
-
ReplaceUnboundVariables
public void ReplaceUnboundVariables(int variableID) Description copied from class:ConditionReplaces 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:
ReplaceUnboundVariablesin interfaceIGroundable- Overrides:
ReplaceUnboundVariablesin classCondition- Parameters:
variableID- - the identifier to be applied
-
MakeGround
Description copied from class:ConditionApplies 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:
MakeGroundin interfaceIGroundable- Overrides:
MakeGroundin classCondition- Parameters:
bindings- - A list of substitutions of the type "[Variable]/value"- See Also:
-
MakeGround
Description copied from class:ConditionApplies 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:
MakeGroundin interfaceIGroundable- Overrides:
MakeGroundin classCondition- Parameters:
subst- - a substitution of the type "[Variable]/value"- See Also:
-
GetPossibleBindings
-
GetValidBindings
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:
GetValidBindingsin classCondition- Returns:
- A list with all SubstitutionsSets that make the condition valid
- See Also:
-
CheckCondition
Checks if the EventCondition is verified in the agent's AutobiographicalMemory- Overrides:
CheckConditionin classPredicateCondition- Returns:
- true if the PastPredicate is verified, false otherwise
- See Also:
-
GetSearchKeys
-