org.mars_sim.msp.simulation.person
Class NaturalAttributeManager

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

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

The NaturalAttributeManager class manages a person's natural attributes. There is only natural attribute manager for each person.

See Also:
Serialized Form

Field Summary
static java.lang.String ACADEMIC_APTITUDE
           
static java.lang.String AGILITY
           
static java.lang.String ATTRACTIVENESS
           
static java.lang.String CONVERSATION
           
static java.lang.String ENDURANCE
           
static java.lang.String EXPERIENCE_APTITUDE
           
static java.lang.String LEADERSHIP
           
static java.lang.String STRENGTH
           
static java.lang.String STRESS_RESILIENCE
           
static java.lang.String TEACHING
           
 
Method Summary
 int getAttribute(java.lang.String name)
          Gets the integer value of a named natural attribute if it exists.
 int getAttributeNum()
          Returns the number of natural attributes.
static java.lang.String[] getKeys()
          Returns an array of the natural attribute names as strings.
 void setAttribute(java.lang.String name, int level)
          Sets an attribute's level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRENGTH

public static final java.lang.String STRENGTH
See Also:
Constant Field Values

ENDURANCE

public static final java.lang.String ENDURANCE
See Also:
Constant Field Values

AGILITY

public static final java.lang.String AGILITY
See Also:
Constant Field Values

TEACHING

public static final java.lang.String TEACHING
See Also:
Constant Field Values

ACADEMIC_APTITUDE

public static final java.lang.String ACADEMIC_APTITUDE
See Also:
Constant Field Values

EXPERIENCE_APTITUDE

public static final java.lang.String EXPERIENCE_APTITUDE
See Also:
Constant Field Values

STRESS_RESILIENCE

public static final java.lang.String STRESS_RESILIENCE
See Also:
Constant Field Values

ATTRACTIVENESS

public static final java.lang.String ATTRACTIVENESS
See Also:
Constant Field Values

LEADERSHIP

public static final java.lang.String LEADERSHIP
See Also:
Constant Field Values

CONVERSATION

public static final java.lang.String CONVERSATION
See Also:
Constant Field Values
Method Detail

getAttributeNum

public int getAttributeNum()
Returns the number of natural attributes.

Returns:
the number of natural attributes

getKeys

public static java.lang.String[] getKeys()
Returns an array of the natural attribute names as strings.

Returns:
an array of the natural attribute names

getAttribute

public int getAttribute(java.lang.String name)
Gets the integer value of a named natural attribute if it exists. Returns 0 otherwise.

Parameters:
name - the name of the attribute
Returns:
the value of the attribute

setAttribute

public void setAttribute(java.lang.String name,
                         int level)
Sets an attribute's level.

Parameters:
name - the name of the attribute
level - the level the attribute is to be set