|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.person.PersonConfig
public class PersonConfig
Provides configuration information about people units. Uses a DOM document to get the information.
| Constructor Summary | |
|---|---|
PersonConfig(org.w3c.dom.Document personDoc)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
getConfiguredPersonGender(int index)
Gets the configured person's gender. |
java.lang.String |
getConfiguredPersonJob(int index)
Gets the configured person's job. |
java.lang.String |
getConfiguredPersonName(int index)
Gets the configured person's name. |
java.lang.String |
getConfiguredPersonPersonalityType(int index)
Gets the configured person's MBTI personality type. |
java.lang.String |
getConfiguredPersonSettlement(int index)
Gets the configured person's starting settlement. |
double |
getDecompressionTime()
Gets the max decompression time a person can survive. |
double |
getFoodConsumptionRate()
Gets the food consumption rate. |
double |
getFoodDeprivationTime()
Gets the food deprivation time. |
double |
getFreezingTime()
Gets the time a person can survive below minimum temperature. |
double |
getGenderRatio()
Gets the gender ratio between males and the total population on Mars. |
double |
getMaxTemperature()
Gets the maximum temperature a person can tolerate. |
double |
getMinAirPressure()
Gets the required air pressure. |
double |
getMinTemperature()
Gets the minimum temperature a person can tolerate. |
java.util.Map<java.lang.String,java.lang.Integer> |
getNaturalAttributeMap(int index)
Gets a map of the configured person's natural attributes. |
int |
getNumberOfConfiguredPeople()
Gets the number of people configured for the simulation. |
double |
getOxygenConsumptionRate()
Gets the oxygen consumption rate. |
double |
getOxygenDeprivationTime()
Gets the oxygen deprivation time. |
double |
getPersonalityTypePercentage(java.lang.String personalityType)
Gets the average percentage for a particular MBTI personality type for settlers. |
java.lang.String |
getPersonGender(java.lang.String name)
Gets the gender of a given person name. |
java.util.List<java.lang.String> |
getPersonNameList()
Gets a list of person names for settlers. |
java.util.Map<java.lang.String,java.lang.Integer> |
getRelationshipMap(int index)
Gets a map of the configured person's relationships. |
java.util.Map<java.lang.String,java.lang.Integer> |
getSkillMap(int index)
Gets a map of the configured person's skills. |
double |
getStarvationStartTime()
Gets the starvation start time. |
double |
getStressBreakdownChance()
Gets the base percent chance that a person will have a stress breakdown when at maximum stress. |
double |
getWaterConsumptionRate()
Gets the water consumption rate. |
double |
getWaterDeprivationTime()
Gets the water deprivation time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersonConfig(org.w3c.dom.Document personDoc)
personDoc - the person congif DOM document.| Method Detail |
|---|
public java.util.List<java.lang.String> getPersonNameList()
throws java.lang.Exception
java.lang.Exception - if person names could not be found.
public java.lang.String getPersonGender(java.lang.String name)
throws java.lang.Exception
name - the name of the person
java.lang.Exception - if person names could not be found.
public double getOxygenConsumptionRate()
throws java.lang.Exception
java.lang.Exception - if consumption rate could not be found.
public double getWaterConsumptionRate()
throws java.lang.Exception
java.lang.Exception - if consumption rate could not be found.
public double getFoodConsumptionRate()
throws java.lang.Exception
java.lang.Exception - if consumption rate could not be found.
public double getOxygenDeprivationTime()
throws java.lang.Exception
java.lang.Exception - if oxygen deprivation time could not be found.
public double getWaterDeprivationTime()
throws java.lang.Exception
java.lang.Exception - if water deprivation time could not be found.
public double getFoodDeprivationTime()
throws java.lang.Exception
java.lang.Exception - if food deprivation time could not be found.
public double getStarvationStartTime()
throws java.lang.Exception
java.lang.Exception - if starvation start time could not be found.
public double getMinAirPressure()
throws java.lang.Exception
java.lang.Exception - if air pressure could not be found.
public double getDecompressionTime()
throws java.lang.Exception
java.lang.Exception - if decompression time could not be found.
public double getMinTemperature()
throws java.lang.Exception
java.lang.Exception - if min temperature cannot be found.
public double getMaxTemperature()
throws java.lang.Exception
java.lang.Exception - if max temperature cannot be found.
public double getFreezingTime()
throws java.lang.Exception
java.lang.Exception - if freezing time could not be found.
public double getStressBreakdownChance()
throws java.lang.Exception
java.lang.Exception - if stress breakdown time could not be found.
public double getGenderRatio()
throws java.lang.Exception
java.lang.Exception - if gender ratio could not be found.
public double getPersonalityTypePercentage(java.lang.String personalityType)
throws java.lang.Exception
personalityType - the MBTI personality type
java.lang.Exception - if personality type could not be found.
public int getNumberOfConfiguredPeople()
throws java.lang.Exception
java.lang.Exception - if error in XML parsing.
public java.lang.String getConfiguredPersonName(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.lang.String getConfiguredPersonGender(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.lang.String getConfiguredPersonPersonalityType(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.lang.String getConfiguredPersonSettlement(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.lang.String getConfiguredPersonJob(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.util.Map<java.lang.String,java.lang.Integer> getNaturalAttributeMap(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.util.Map<java.lang.String,java.lang.Integer> getSkillMap(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
public java.util.Map<java.lang.String,java.lang.Integer> getRelationshipMap(int index)
throws java.lang.Exception
index - the person's index.
java.lang.Exception - if error in XML parsing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||