Package FAtiMA.emotionalIntelligence
Class EmotionalEpisodeCondition
java.lang.Object
FAtiMA.Core.conditions.Condition
FAtiMA.emotionalIntelligence.EmotionalEpisodeCondition
- All Implemented Interfaces:
FAtiMA.Core.wellFormedNames.IGroundable,Serializable,Cloneable
public class EmotionalEpisodeCondition
extends FAtiMA.Core.conditions.Condition
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheckCondition(FAtiMA.Core.AgentModel am) Checks if theclone()Clones this EmotionCondition, returning an equal copy.ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet>GetValidBindings(FAtiMA.Core.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 EmotionalStateFAtiMA.Core.wellFormedNames.NameGetValue()protected ArrayList<FAtiMA.Core.wellFormedNames.Substitution>GetValueBindings(FAtiMA.Core.AgentModel am) booleanvoidMakeGround(FAtiMA.Core.wellFormedNames.Substitution subst) Applies a set of substitutions to the object, grounding it.voidMakeGround(ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings) Applies a set of substitutions to the object, grounding it.static EmotionalEpisodeConditionParseEmotionalEpisodeCondition(Attributes attributes) Parses a EmotionCondition 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.Condition
CheckActivation, getName, getToM, hasChangedVerifiability, isVerifiable, setName, setToM, setVerifiable
-
Field Details
-
_emotion
protected FAtiMA.Core.wellFormedNames.Symbol _emotion -
_value
protected float _value
-
-
Constructor Details
-
EmotionalEpisodeCondition
public EmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value) -
EmotionalEpisodeCondition
-
-
Method Details
-
ParseEmotionalEpisodeCondition
public static EmotionalEpisodeCondition ParseEmotionalEpisodeCondition(Attributes attributes) throws FAtiMA.Core.exceptions.InvalidEmotionTypeException Parses a EmotionCondition given a XML attribute list- Parameters:
attributes- - A list of XMl attributes- Returns:
- - the EmotionCondition Parsed
- Throws:
FAtiMA.Core.exceptions.InvalidEmotionTypeException
-
CheckCondition
public boolean CheckCondition(FAtiMA.Core.AgentModel am) Checks if the- Specified by:
CheckConditionin classFAtiMA.Core.conditions.Condition- Returns:
- status
-
clone
Clones this EmotionCondition, returning an equal copy. If this clone is changed afterwards, the original object remains the same.- Specified by:
clonein classFAtiMA.Core.conditions.Condition- Returns:
- The EmotionCondition's copy.
-
GetValidBindings
public ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet> GetValidBindings(FAtiMA.Core.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 EmotionalState- Overrides:
GetValidBindingsin classFAtiMA.Core.conditions.Condition- Returns:
- A list with all SubstitutionsSets that make the condition valid
- See Also:
-
EmotionalState
-
GetValue
public FAtiMA.Core.wellFormedNames.Name GetValue()- Specified by:
GetValuein classFAtiMA.Core.conditions.Condition
-
GetValueBindings
protected ArrayList<FAtiMA.Core.wellFormedNames.Substitution> GetValueBindings(FAtiMA.Core.AgentModel am) - Specified by:
GetValueBindingsin classFAtiMA.Core.conditions.Condition
-
isGrounded
public boolean isGrounded()- Specified by:
isGroundedin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
isGroundedin classFAtiMA.Core.conditions.Condition
-
MakeGround
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:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
MakeGroundin classFAtiMA.Core.conditions.Condition- Parameters:
bindings- - A list of substitutions of the type "[Variable]/value"- See Also:
-
Substitution
-
MakeGround
public void MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst) 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:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
MakeGroundin classFAtiMA.Core.conditions.Condition- Parameters:
subst- - a substitution of the type "[Variable]/value"- See Also:
-
Substitution
-
ReplaceUnboundVariables
public void ReplaceUnboundVariables(int variableID) 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:
ReplaceUnboundVariablesin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
ReplaceUnboundVariablesin classFAtiMA.Core.conditions.Condition- Parameters:
variableID- - the identifier to be applied
-