almabasedmodel
Class AEmotion

java.lang.Object
  extended by almabasedmodel.AEmotion
All Implemented Interfaces:
java.io.Serializable

public class AEmotion
extends java.lang.Object
implements java.io.Serializable

This class is used to store ALMA emotions outside ALMA. Implements serializable, because it is logged!

See Also:
Serialized Form

Field Summary
private  java.lang.String elicitor
          Elicitor of the emotion - who have caused this emotion to be felt?
private  int elicitorId
          If elicitor is an agent, his id will be here, -1 otherwise
private  java.lang.Double intensity
          Intensity of the emotion, ranges from 0 to 1
private  de.affect.emotion.EmotionType type
          Type of the emotion - EmotionType defined in ALMA
 
Constructor Summary
AEmotion(de.affect.emotion.EmotionType type, double intensity, java.lang.String elicitor, int id)
          Constructor for this class.
 
Method Summary
 java.lang.String getElicitor()
          Gets emotion elicitor - the cause of the emotion.
 int getElicitorId()
          If elicitor is an agent, his id can be got by this method.
 double getIntensity()
          Gets emotion intensity.
 de.affect.emotion.EmotionType getType()
          Gets emotion type.
 void setElicitor(java.lang.String newElicitor)
          Sets the elicitor - the emotion cause - for the emotion.
 void setElicitorId(int newId)
          Sets elicitor id.
 void setIntensity(double newInt)
          Sets the intensity of the emotion.
 void setType(de.affect.emotion.EmotionType newType)
          Sets type of the emotion.
 java.lang.String toString()
          toString method define the way we want our object to be printed in the console, and/or transfered to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

private de.affect.emotion.EmotionType type
Type of the emotion - EmotionType defined in ALMA


intensity

private java.lang.Double intensity
Intensity of the emotion, ranges from 0 to 1


elicitor

private java.lang.String elicitor
Elicitor of the emotion - who have caused this emotion to be felt?


elicitorId

private int elicitorId
If elicitor is an agent, his id will be here, -1 otherwise

Constructor Detail

AEmotion

public AEmotion(de.affect.emotion.EmotionType type,
                double intensity,
                java.lang.String elicitor,
                int id)
Constructor for this class. Requires type of the emotion, its intensity, elicitor and elicitor id if the elicitor is an agent.

Parameters:
type - type of the emotion
intensity - intensity of the emotion
elicitor - elicitor of the emotion
id - elicitor id - if it is an agent
Method Detail

getType

public de.affect.emotion.EmotionType getType()
Gets emotion type.

Returns:
emotion type

getIntensity

public double getIntensity()
Gets emotion intensity.

Returns:
emotion intensity

getElicitor

public java.lang.String getElicitor()
Gets emotion elicitor - the cause of the emotion.

Returns:
emotion elicitor

getElicitorId

public int getElicitorId()
If elicitor is an agent, his id can be got by this method.

Returns:
agent id - if the elicitor is an agent

setType

public void setType(de.affect.emotion.EmotionType newType)
Sets type of the emotion.

Parameters:
newType - emotion type

setIntensity

public void setIntensity(double newInt)
Sets the intensity of the emotion. Ranges from 0 to 1.

Parameters:
newInt - new intensity

setElicitor

public void setElicitor(java.lang.String newElicitor)
Sets the elicitor - the emotion cause - for the emotion.

Parameters:
newElicitor - new elicitor

setElicitorId

public void setElicitorId(int newId)
Sets elicitor id.

Parameters:
newId - new id.

toString

public java.lang.String toString()
toString method define the way we want our object to be printed in the console, and/or transfered to String.

Overrides:
toString in class java.lang.Object
Returns:
string serialization of this object