|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.structure.building.function.Function
org.mars_sim.msp.simulation.structure.building.function.VehicleMaintenance
public abstract class VehicleMaintenance
The VehicleMaintenance interface is a building function for a building capable of maintaining vehicles.
| Field Summary | |
|---|---|
protected int |
vehicleCapacity
|
| Constructor Summary | |
|---|---|
VehicleMaintenance(java.lang.String name,
Building building)
Constructor |
|
| Method Summary | |
|---|---|
void |
addVehicle(Vehicle vehicle)
Add vehicle to building if there's room. |
boolean |
containsVehicle(Vehicle vehicle)
Checks if a vehicle is in the building. |
int |
getCurrentVehicleNumber()
Gets the current number of vehicles in the building. |
double |
getFullPowerRequired()
Gets the amount of power required when function is at full power. |
double |
getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level. |
int |
getVehicleCapacity()
Gets the number of vehicles the building can accommodate. |
java.util.Collection<Vehicle> |
getVehicles()
Gets a collection of vehicles in the building. |
void |
removeVehicle(Vehicle vehicle)
Remove vehicle from building if it's in the building. |
void |
timePassing(double time)
Time passing for the building. |
| Methods inherited from class org.mars_sim.msp.simulation.structure.building.function.Function |
|---|
getBuilding, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int vehicleCapacity
| Constructor Detail |
|---|
public VehicleMaintenance(java.lang.String name,
Building building)
name - the name of the child function.building - the building this function is for.| Method Detail |
|---|
public int getVehicleCapacity()
public int getCurrentVehicleNumber()
public void addVehicle(Vehicle vehicle)
throws BuildingException
vehicle - the vehicle to be added.
BuildingException - if vehicle cannot be added.
public void removeVehicle(Vehicle vehicle)
throws BuildingException
vehicle - the vehicle to be removed.
BuildingException - if vehicle is not in the building.public boolean containsVehicle(Vehicle vehicle)
public java.util.Collection<Vehicle> getVehicles()
public void timePassing(double time)
throws BuildingException
timePassing in class Functiontime - amount of time passing (in millisols)
BuildingException - if error occurs.public double getFullPowerRequired()
getFullPowerRequired in class Functionpublic double getPowerDownPowerRequired()
getPowerDownPowerRequired in class Function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||