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

java.lang.Object
  extended by org.mars_sim.msp.core.structure.building.function.Function
      extended by org.mars_sim.msp.core.structure.building.function.Dining
All Implemented Interfaces:
Serializable

public class Dining
extends Function
implements Serializable

The Dining class is a building function for dining.

See Also:
Serialized Form

Field Summary
static String NAME
           
 
Constructor Summary
Dining(Building building)
          Constructor
 
Method Summary
 int getDiningCapacity()
          Gets the dining capacity of the building.
 double getFullPowerRequired()
          Gets the amount of power required when function is at full power.
static double getFunctionValue(String buildingName, boolean newBuilding, Settlement settlement)
          Gets the value of the function for a named building.
 double getPowerDownPowerRequired()
          Gets the amount of power required when function is at power down level.
 void timePassing(double time)
          Time passing for the building.
 
Methods inherited from class org.mars_sim.msp.core.structure.building.function.Function
destroy, getBuilding, getMalfunctionScopeStrings, getName, removeFromSettlement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

Dining

public Dining(Building building)
Constructor

Parameters:
building - the building this function is for.
Method Detail

getFunctionValue

public static double getFunctionValue(String buildingName,
                                      boolean newBuilding,
                                      Settlement settlement)
Gets the value of the function for a named building.

Parameters:
buildingName - the building name.
newBuilding - true if adding a new building.
settlement - the settlement.
Returns:
value (VP) of building function.
Throws:
Exception - if error getting function value.

getDiningCapacity

public int getDiningCapacity()
Gets the dining capacity of the building.

Returns:
capacity.

timePassing

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

Specified by:
timePassing in class Function
Parameters:
time - amount of time passing (in millisols)
Throws:
BuildingException - if error occurs.

getFullPowerRequired

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

Specified by:
getFullPowerRequired in class Function
Returns:
power (kW)

getPowerDownPowerRequired

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

Specified by:
getPowerDownPowerRequired in class Function
Returns:
power (kW)


Copyright © 2009-2013. All Rights Reserved.