Package FAtiMA.Core

Class ValuedAction

java.lang.Object
FAtiMA.Core.ValuedAction
All Implemented Interfaces:
Serializable

public class ValuedAction extends Object implements Serializable
Action that has associated with it an emotion. This emotion was responsible in part for the selection of the action, and can be used to select between conflicting actions. The action supported by the strongest emotion wins.
Author:
Joao Dias
See Also:
  • Constructor Details

    • ValuedAction

      public ValuedAction(String component, Name action, ActiveEmotion emotion)
      Creates a new ValuedAction
      Parameters:
      action - - the action
      emotion - - the emotion associated to the action
    • ValuedAction

      public ValuedAction(String component, Name action, float value)
  • Method Details

    • getComponent

      public String getComponent()
    • getAction

      public Name getAction()
      Gets the Action's name
      Returns:
      the action to perform
    • getEmotion

      public ActiveEmotion getEmotion(EmotionalState es)
      Gets the Emotion that supports this action
      Returns:
      the Emotion associated with the action
    • getValue

      public float getValue(EmotionalState es)
      Gets an emotional value associated with the action
      Returns:
      a float representing how emotionally important is the action
    • setEmotion

      public void setEmotion(ActiveEmotion emotion)
      Sets the Emotion associated with the action
      Parameters:
      emotion - - the new ActiveEmotion to associate to the action
    • toString

      public String toString()
      Converts the ValuedAction to a String
      Overrides:
      toString in class Object
      Returns:
      the converted String