|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.person.medical.MedicalManager
public class MedicalManager
This class provides a Factory for the Complaint class. Some of the Medical Complaints are pre-defined. Instances are accessed via a factory method since the properties of the individual complaints are loaded from the XML.
Field Summary | |
---|---|
static java.lang.String |
DECOMPRESSION
The name of the decompression complaint |
static java.lang.String |
DEHYDRATION
The name of the Dehydration complaint |
static java.lang.String |
FREEZING
The name of the freezing complaint |
static java.lang.String |
HEAT_STROKE
The name of the heat stroke complaint |
static int |
MINSPERDAY
|
static java.lang.String |
STARVATION
The name of the starvation complaint |
static java.lang.String |
SUFFOCATION
The name of the suffocation complaint |
Constructor Summary | |
---|---|
MedicalManager()
Construct a new Medical Manager. |
Method Summary | |
---|---|
Complaint |
getComplaintByName(java.lang.String name)
This is a finder method that returns a Meidcal Complaint matching the specified name. |
Complaint |
getDecompression()
Return the pre-defined Medical Complaint that signifies a Decompression conplaint. |
Complaint |
getDehydration()
Return the pre-defined Medical Complaint that signifies a dehydration complaint. |
Complaint |
getFreezing()
Return the pre-defined Medical Complaint that signifies a Freezing complaint. |
Complaint |
getHeatStroke()
Return the pre-defined Medical Complaint that signifies a Heat Stroke complaint. |
Complaint |
getProbableComplaint(Person person,
double time)
Select a probable complaint to strike the Person down. |
Complaint |
getStarvation()
Return the pre-defined Medical Complaint that signifies a Stavation complaint. |
Complaint |
getSuffocation()
Return the pre-defined Medical Complaint that signifies a suffocation complaint. |
java.util.List<Treatment> |
getSupportedTreatments(int level)
Get the supported Treatments for a Medical Facility of a particular level. |
Treatment |
getTreatmentByName(java.lang.String name)
This is a finder method that returns a Meidcal Treatment matching the specified name. |
void |
initMedical()
Initialise the Medical Complaints from the configuration. |
boolean |
isEnvironmentalComplaint(Complaint complaint)
Checks if a health complaint is an environmental complaint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MINSPERDAY
public static final java.lang.String SUFFOCATION
public static final java.lang.String DEHYDRATION
public static final java.lang.String STARVATION
public static final java.lang.String DECOMPRESSION
public static final java.lang.String FREEZING
public static final java.lang.String HEAT_STROKE
Constructor Detail |
---|
public MedicalManager() throws java.lang.Exception
java.lang.Exception
- if unable to construct.Method Detail |
---|
public void initMedical() throws java.lang.Exception
exception
- if not able to initialize complaints.
java.lang.Exception
public Complaint getProbableComplaint(Person person, double time)
person
- The person that may have a complaint.time
- the time passing (millisols).
public Complaint getComplaintByName(java.lang.String name)
name
- Name of the complaint to retrieve.
public Treatment getTreatmentByName(java.lang.String name)
name
- Name of the treatment to retrieve.
public Complaint getSuffocation()
public java.util.List<Treatment> getSupportedTreatments(int level)
level
- Level of Medical facility.
public Complaint getDehydration()
public Complaint getStarvation()
public Complaint getDecompression()
public Complaint getFreezing()
public Complaint getHeatStroke()
public boolean isEnvironmentalComplaint(Complaint complaint)
complaint
- the complaint to check.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |