|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.person.ai.social.Relationship
public class Relationship
The Relationship class represents a social relationship between two people.
| Field Summary | |
|---|---|
static java.lang.String |
EXISTING_RELATIONSHIP
|
static java.lang.String |
FIRST_IMPRESSION
|
| Method Summary | |
|---|---|
Person[] |
getPeople()
Gets the two people in relationship. |
double |
getPersonOpinion(Person person)
Gets one of the two people's opinion of the other. |
boolean |
hasPerson(Person person)
Checks if a given person is in this relationship. |
void |
setPersonOpinion(Person person,
double opinion)
Sets one of the two people's opinion of the other. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FIRST_IMPRESSION
public static final java.lang.String EXISTING_RELATIONSHIP
| Method Detail |
|---|
public Person[] getPeople()
public boolean hasPerson(Person person)
person - the person to check
public double getPersonOpinion(Person person)
throws java.lang.IllegalArgumentException
person - the person to get an opinion from.
java.lang.IllegalArgumentException - if person is not one of the two people in the relationship.
public void setPersonOpinion(Person person,
double opinion)
throws java.lang.IllegalArgumentException
person - the person to set the opinion for.opinion - the person's opinion of the other person as a value from 0 to 100.
java.lang.IllegalArgumentException - if person is not one of the two people in the relationship.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||