|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.vehicle.VehicleConfig
public class VehicleConfig
Provides configuration information about vehicle units. Uses a DOM document to get the information.
| Constructor Summary | |
|---|---|
VehicleConfig(org.jdom.Document vehicleDoc)
Constructor |
|
| Method Summary | |
|---|---|
void |
destroy()
Prepare object for garbage collection. |
Collection<Part> |
getAttachableParts(String vehicleType)
Gets all of the parts that can be attached to a vehicle. |
double |
getBaseSpeed(String vehicleType)
Gets the vehicle's base speed. |
double |
getCargoCapacity(String vehicleType,
String resource)
Gets the vehicle's capacity for a resource. |
int |
getCrewSize(String vehicleType)
Gets the vehicle's maximum crew size. |
double |
getEmptyMass(String vehicleType)
Gets the vehicle's mass when empty. |
double |
getFuelEfficiency(String vehicleType)
Gets the vehicle's fuel efficiency. |
int |
getLabTechLevel(String vehicleType)
Gets the vehicle's lab tech level. |
List<String> |
getLabTechSpecialities(String vehicleType)
Gets a list of the vehicle's lab tech specialities. |
double |
getLength(String vehicleType)
Gets the vehicle's length. |
int |
getPartAttachmentSlotNumber(String vehicleType)
Gets the number of part attachment slots for a vehicle. |
List<String> |
getRoverNameList()
Gets a list of rover names. |
int |
getSickbayBeds(String vehicleType)
Gets the vehicle's sickbay bed number. |
int |
getSickbayTechLevel(String vehicleType)
Gets the vehicle's sickbay tech level. |
double |
getTotalCapacity(String vehicleType)
Gets the vehicle's total cargo capacity. |
Set<String> |
getVehicleTypes()
Returns a set of all vehicle types. |
double |
getWidth(String vehicleType)
Gets the vehicle's width. |
boolean |
hasLab(String vehicleType)
Checks if the vehicle has a lab. |
boolean |
hasPartAttachments(String vehicleType)
Checks if a vehicle type has the ability to attach parts. |
boolean |
hasSickbay(String vehicleType)
Checks if the vehicle has a sickbay. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VehicleConfig(org.jdom.Document vehicleDoc)
vehicleDoc - DOM document with vehicle configuration.| Method Detail |
|---|
public Set<String> getVehicleTypes()
Exception - if error retrieving vehicle types.public double getWidth(String vehicleType)
vehicleType - the vehicle type.
public double getLength(String vehicleType)
vehicleType - the vehicle type.
public double getFuelEfficiency(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public double getBaseSpeed(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public double getEmptyMass(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public int getCrewSize(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public double getTotalCapacity(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.
public double getCargoCapacity(String vehicleType,
String resource)
vehicleType - the vehicle typeresource - the resource
Exception - if vehicle type could not be found or XML parsing error.public boolean hasSickbay(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public int getSickbayTechLevel(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public int getSickbayBeds(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public boolean hasLab(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public int getLabTechLevel(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public List<String> getLabTechSpecialities(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public boolean hasPartAttachments(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public int getPartAttachmentSlotNumber(String vehicleType)
vehicleType - the vehicle type.
Exception - if vehicle type could not be found or XML parsing error.public Collection<Part> getAttachableParts(String vehicleType)
vehicleType - the vehicle type
Exception - if vehicle type could not be found or XML parsing error.public List<String> getRoverNameList()
Exception - if XML parsing error.public void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||