|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynesketch.emotion.Emotion
public class Emotion
Represents one emotion, with it's type and weight.
Emotion types are the ones defined by Ekman: happiness, sadness, fear, anger, disgust, surprise. These types are defines by the static attributes of this class.
| Field Summary | |
|---|---|
static int |
ANGER
|
static int |
DISGUST
|
static int |
FEAR
|
static int |
HAPPINESS
|
static int |
NEUTRAL
|
static int |
SADNESS
|
static int |
SURPRISE
|
| Constructor Summary | |
|---|---|
Emotion(double weight,
int type)
Class constructor which sets weight and type of the emotion. |
|
| Method Summary | |
|---|---|
int |
compareTo(Emotion arg0)
Compares weights of current object and the one from the argument. |
int |
getType()
Getter for the emotion type |
double |
getWeight()
Getter for the emotional weight |
void |
setType(int type)
Setter for the emotion type |
void |
setWeight(double value)
Setter for the emotional weight |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int NEUTRAL
public static int HAPPINESS
public static int SADNESS
public static int FEAR
public static int ANGER
public static int DISGUST
public static int SURPRISE
| Constructor Detail |
|---|
public Emotion(double weight,
int type)
weight - double which represents the intensity of the emotion (can take
values between 0 and 1)type - type of the emotion (happiness, sadness, fear, anger, disgust,
or surprise)| Method Detail |
|---|
public int compareTo(Emotion arg0)
compareTo in interface java.lang.Comparable<Emotion>arg0 - Emotion which is to compared to the current one
public int getType()
public void setType(int type)
type - emotion type (integer constant defined by this class)public double getWeight()
public void setWeight(double value)
value - double representing the emotional weightpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||