org.mars_sim.msp.simulation.person.ai
Class PersonalityType

java.lang.Object
  extended by org.mars_sim.msp.simulation.person.ai.PersonalityType
All Implemented Interfaces:
java.io.Serializable

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

The MBTI (Myers-Briggs Type Indicator) personality type for the person.

See Also:
Serialized Form

Method Summary
 int getPersonalityDifference(java.lang.String otherPersonality)
          Get the numerical difference between two personality types (0 - 4)
 java.lang.String getTypeString()
          Gets the personality type as a four letter code.
 boolean isExtrovert()
          Checks if the personality is extrovert.
 boolean isFeeler()
          Checks if the personality is feeler.
 boolean isIntrovert()
          Checks if the personality is introvert.
 boolean isIntuitive()
          Checks if the personality is intuitive.
 boolean isJudger()
          Checks if the personality is judger.
 boolean isPerceiver()
          Checks if the personality is perceiver.
 boolean isSensor()
          Checks if the personality is sensor.
 boolean isThinker()
          Checks if the personality is thinker.
 void setTypeString(java.lang.String newPersonalityType)
          Sets the personality type
 java.lang.String toString()
          Get this object as a string.
 void updateStress(double time)
          Updates a person's stress based on his/her personality.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTypeString

public java.lang.String getTypeString()
Gets the personality type as a four letter code. Ex. "ISTJ"

Returns:
personality type.

setTypeString

public void setTypeString(java.lang.String newPersonalityType)
Sets the personality type

Parameters:
newPersonalityType - for letter MBTI code.

toString

public java.lang.String toString()
Get this object as a string.

Overrides:
toString in class java.lang.Object

getPersonalityDifference

public int getPersonalityDifference(java.lang.String otherPersonality)
Get the numerical difference between two personality types (0 - 4)

Parameters:
otherPersonality - the other MBTI personality to check.
Returns:
total difference in indicators.

isIntrovert

public boolean isIntrovert()
Checks if the personality is introvert.

Returns:
true if introvert

isExtrovert

public boolean isExtrovert()
Checks if the personality is extrovert.

Returns:
true if extrovert

isSensor

public boolean isSensor()
Checks if the personality is sensor.

Returns:
true if sensor

isIntuitive

public boolean isIntuitive()
Checks if the personality is intuitive.

Returns:
true if intuitive

isThinker

public boolean isThinker()
Checks if the personality is thinker.

Returns:
true if thinker

isFeeler

public boolean isFeeler()
Checks if the personality is feeler.

Returns:
true if feeler

isJudger

public boolean isJudger()
Checks if the personality is judger.

Returns:
true if judger

isPerceiver

public boolean isPerceiver()
Checks if the personality is perceiver.

Returns:
true if perceiver

updateStress

public void updateStress(double time)
                  throws java.lang.Exception
Updates a person's stress based on his/her personality.

Parameters:
time - the time passing (millisols)
Throws:
java.lang.Exception - if problem updating stress.