Class BeastMood

java.lang.Object
  extended by BeastMood

public class BeastMood
extends java.lang.Object

A Beast's mood, defined as two parameters: grooviness and intensity. Emotions like happiness, joy, and pride have positive grooviness. Emotions like anger, frustration, and rage have negative grooviness. Emotions like rapture and rage have higher intensities than emotions like smugness and sullenness. Emotions like "hyper" and "deadpan" may vary in intensity but have zero grooviness. In human-computer interaction (HCI), we do use a scale like this to describe emotion, but the axes are generally called "valence" and intensity rather than grooviness and intensity.

Author:
CPSC 111 instructors

Field Summary
static double MAX_GROOVINESS
          The maximum allowable grooviness.
static double MAX_INTENSITY
          The maximum allowable intensity.
static double MIN_GROOVINESS
          The minimum allowable grooviness.
static double MIN_INTENSITY
          The minimum allowable intensity.
 
Constructor Summary
BeastMood(double grooviness, double intensity)
          Construct a mood reflecting the given parameters.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getGrooviness()
          Get the grooviness of this mood.
 double getIntensity()
          Get the intensity of this mood.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_GROOVINESS

public static double MAX_GROOVINESS
The maximum allowable grooviness.


MIN_GROOVINESS

public static double MIN_GROOVINESS
The minimum allowable grooviness.


MAX_INTENSITY

public static double MAX_INTENSITY
The maximum allowable intensity.


MIN_INTENSITY

public static double MIN_INTENSITY
The minimum allowable intensity.

Constructor Detail

BeastMood

public BeastMood(double grooviness,
                 double intensity)
Construct a mood reflecting the given parameters.

Note: the parameters will be clipped to the allowable ranges of grooviness and intensity.

Parameters:
grooviness - the grooviness of the mood
intensity - the intensity of the mood
Method Detail

getGrooviness

public double getGrooviness()
Get the grooviness of this mood. (Positive values are groovy, man. Negative values are definitely ungroovy.)

Returns:
the grooviness, between MIN_GROOVINESS and MAX_GROOVINESS

getIntensity

public double getIntensity()
Get the intensity of this mood. (Higher values are more intense.)

Returns:
the intensity, between MIN_INTENSITY and MAX_INTENSITY

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object