org.mars_sim.msp.simulation.equipment
Class EquipmentFactory

java.lang.Object
  extended by org.mars_sim.msp.simulation.equipment.EquipmentFactory

public final class EquipmentFactory
extends java.lang.Object

A factory for equipment units.


Method Summary
static Equipment getEquipment(java.lang.Class equipmentClass, Coordinates location, boolean temp)
          Gets an equipment instance from an equipment class.
static Equipment getEquipment(java.lang.String type, Coordinates location, boolean temp)
          Gets an equipment instance from an equipment type string.
static java.lang.Class getEquipmentClass(java.lang.String type)
          Gets the class of equipment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEquipment

public static Equipment getEquipment(java.lang.String type,
                                     Coordinates location,
                                     boolean temp)
                              throws java.lang.Exception
Gets an equipment instance from an equipment type string.

Parameters:
type - the equipment type string.
location - the location of the equipment.
temp - is this equipment only temporary?
Returns:
the equipment instance.
Throws:
java.lang.Exception - if error creating equipment instance.

getEquipment

public static Equipment getEquipment(java.lang.Class equipmentClass,
                                     Coordinates location,
                                     boolean temp)
                              throws java.lang.Exception
Gets an equipment instance from an equipment class.

Parameters:
equipmentClass - the equipment class to use.
location - the location of the equipment.
temp - is this equipment only temporary?
Returns:
the equipment instance.
Throws:
java.lang.Exception - if error creating equipment instance.

getEquipmentClass

public static java.lang.Class getEquipmentClass(java.lang.String type)
                                         throws java.lang.Exception
Gets the class of equipment.

Parameters:
type - the equipment type string.
Returns:
the equipment class.
Throws:
java.lang.Exception - if equipment class could not be found.