org.mars_sim.msp.simulation.vehicle
Class VehicleAirlock

java.lang.Object
  extended by org.mars_sim.msp.simulation.Airlock
      extended by org.mars_sim.msp.simulation.vehicle.VehicleAirlock
All Implemented Interfaces:
java.io.Serializable

public class VehicleAirlock
extends Airlock

The VehicleAirlock class represents an airlock for a vehicle.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mars_sim.msp.simulation.Airlock
pressurized
 
Constructor Summary
VehicleAirlock(Vehicle vehicle, int capacity)
          Constructor
 
Method Summary
protected  void exitAirlock(Person person)
          Causes a person within the airlock to exit either inside or outside.
 Inventory getEntityInventory()
          Gets the inventory of the entity this airlock is attached to.
 java.lang.String getEntityName()
          Gets the name of the entity this airlock is attached to.
 
Methods inherited from class org.mars_sim.msp.simulation.Airlock
activateAirlock, addActivationTime, enterAirlock, inAirlock, isInnerDoorOpen, isOuterDoorOpen, timePassing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VehicleAirlock

public VehicleAirlock(Vehicle vehicle,
                      int capacity)
Constructor

Parameters:
vehicle - the vehicle this airlock of for.
capacity - number of people airlock can hold.
Throws:
java.lang.IllegalArgumentException - if vehicle is not valid or if capacity is less than one.
Method Detail

exitAirlock

protected void exitAirlock(Person person)
                    throws java.lang.Exception
Causes a person within the airlock to exit either inside or outside.

Specified by:
exitAirlock in class Airlock
Parameters:
person - the person to exit.
Throws:
java.lang.Exception - if person is not in the airlock.

getEntityName

public java.lang.String getEntityName()
Gets the name of the entity this airlock is attached to.

Specified by:
getEntityName in class Airlock
Returns:
name

getEntityInventory

public Inventory getEntityInventory()
Gets the inventory of the entity this airlock is attached to.

Specified by:
getEntityInventory in class Airlock
Returns:
inventory