org.pandora.emotion
Class AbstractEmotion

java.lang.Object
  extended by org.pandora.emotion.AbstractEmotion
All Implemented Interfaces:
Emotion
Direct Known Subclasses:
Anger, Fear, Happiness, Humor, Love, Surprise

public abstract class AbstractEmotion
extends java.lang.Object
implements Emotion

Defines a emotion. An emotion is a state defined by a magnitude that affects behavior.


Constructor Summary
AbstractEmotion()
           
 
Method Summary
 EmotionalState evaluate(float level)
           
 java.lang.String getName()
           
 float getState()
           
 void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
          Initialize any configurable settings from the properties.
 Primitive primitive()
           
 void setState(float state)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractEmotion

public AbstractEmotion()
Method Detail

getState

public float getState()
Specified by:
getState in interface Emotion

setState

public void setState(float state)
Specified by:
setState in interface Emotion

getName

public java.lang.String getName()
Specified by:
getName in interface Emotion

primitive

public Primitive primitive()
Specified by:
primitive in interface Emotion

evaluate

public EmotionalState evaluate(float level)
Specified by:
evaluate in interface Emotion

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

initialize

public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
Initialize any configurable settings from the properties.

Specified by:
initialize in interface Emotion