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

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

public abstract class Function
extends Object
implements Serializable

A settlement building function.

See Also:
Serialized Form

Constructor Summary
Function(String name, Building building)
          Constructor
 
Method Summary
 void destroy()
          Prepare object for garbage collection.
 Building getBuilding()
          Gets the function's building.
abstract  double getFullPowerRequired()
          Gets the amount of power required when function is at full power.
 String[] getMalfunctionScopeStrings()
          Gets the function's malfunction scope strings.
 String getName()
          Gets the function name.
abstract  double getPowerDownPowerRequired()
          Gets the amount of power required when function is at power down level.
 void removeFromSettlement()
          Perform any actions needed when removing this building function from the settlement.
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(String name,
                Building building)
Constructor

Parameters:
name - the function name.
Method Detail

getName

public String getName()
Gets the function name.

Returns:
name

getBuilding

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

Returns:
building

getMalfunctionScopeStrings

public String[] getMalfunctionScopeStrings()
Gets the function's malfunction scope strings.

Returns:
array of scope strings.

timePassing

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

Parameters:
time - amount of time passing (in millisols)

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)

removeFromSettlement

public void removeFromSettlement()
Perform any actions needed when removing this building function from the settlement.


destroy

public void destroy()
Prepare object for garbage collection.



Copyright © 2009-2013. All Rights Reserved.