org.mars_sim.msp.simulation.structure.building.function
Class Function

java.lang.Object
  extended by org.mars_sim.msp.simulation.structure.building.function.Function
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Communication, Cooking, Dining, EVA, Exercise, Farming, LifeSupport, LivingAccommodations, Manufacture, MedicalCare, PowerGeneration, Recreation, Research, ResourceProcessing, Storage, VehicleMaintenance

public abstract class Function
extends java.lang.Object
implements java.io.Serializable

A settlement building function.

See Also:
Serialized Form

Constructor Summary
Function(java.lang.String name, Building building)
          Constructor
 
Method Summary
 Building getBuilding()
          Gets the function's building.
abstract  double getFullPowerRequired()
          Gets the amount of power required when function is at full power.
 java.lang.String getName()
          Gets the function name.
abstract  double getPowerDownPowerRequired()
          Gets the amount of power required when function is at power down level.
abstract  void timePassing(double time)
          Time passing for the building.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

public Function(java.lang.String name,
                Building building)
Constructor

Parameters:
name - the function name.
Method Detail

getName

public java.lang.String getName()
Gets the function name.

Returns:
name

getBuilding

public Building getBuilding()
Gets the function's building.

Returns:
building

timePassing

public abstract void timePassing(double time)
                          throws BuildingException
Time passing for the building.

Parameters:
time - amount of time passing (in millisols)
Throws:
BuildingException - if error occurs.

getFullPowerRequired

public abstract double getFullPowerRequired()
Gets the amount of power required when function is at full power.

Returns:
power (kW)

getPowerDownPowerRequired

public abstract double getPowerDownPowerRequired()
Gets the amount of power required when function is at power down level.

Returns:
power (kW)