|
||||||||||
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.Building
public class Building
The Building class is a settlement's building.
Field Summary | |
---|---|
protected double |
basePowerDownPowerRequirement
|
protected double |
basePowerRequirement
|
static java.lang.String |
FULL_POWER
|
protected java.util.List<Function> |
functions
|
protected MalfunctionManager |
malfunctionManager
|
protected BuildingManager |
manager
|
protected java.lang.String |
name
|
static java.lang.String |
NO_POWER
|
static java.lang.String |
POWER_DOWN
|
protected java.lang.String |
powerMode
|
Constructor Summary | |
---|---|
protected |
Building()
Empty constructor. |
|
Building(java.lang.String name,
BuildingManager manager)
Constructs a Building object. |
Method Summary | |
---|---|
java.util.Collection<Person> |
getAffectedPeople()
Gets a collection of people affected by this entity. |
BuildingManager |
getBuildingManager()
Gets the building's building manager. |
double |
getFullPowerRequired()
Gets the power this building currently requires for full-power mode. |
Function |
getFunction(java.lang.String functionName)
Gets a function if the building has it. |
Inventory |
getInventory()
Gets the inventory associated with this entity. |
MalfunctionManager |
getMalfunctionManager()
Gets the entity's malfunction manager. |
java.lang.String |
getName()
Gets the building's name. |
double |
getPoweredDownPowerRequired()
Gets the power the building requires for power-down mode. |
java.lang.String |
getPowerMode()
Gets the building's power mode. |
boolean |
hasFunction(java.lang.String functionName)
Checks if a building has a particular function. |
void |
setPowerMode(java.lang.String powerMode)
Sets the building's power mode. |
void |
timePassing(double time)
Time passing for building. |
java.lang.String |
toString()
String representation of this building. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FULL_POWER
public static final java.lang.String POWER_DOWN
public static final java.lang.String NO_POWER
protected BuildingManager manager
protected java.lang.String name
protected java.lang.String powerMode
protected MalfunctionManager malfunctionManager
protected java.util.List<Function> functions
protected double basePowerRequirement
protected double basePowerDownPowerRequirement
Constructor Detail |
---|
public Building(java.lang.String name, BuildingManager manager) throws BuildingException
name
- the building's name.manager
- the building's building manager.
BuildingException
- if building can not be created.protected Building()
Method Detail |
---|
public boolean hasFunction(java.lang.String functionName)
functionName
- the name of the function.
public Function getFunction(java.lang.String functionName) throws BuildingException
functionName
- the name of the function.
BuildingException
- if building doesn't have the function.public BuildingManager getBuildingManager()
public java.lang.String getName()
getName
in interface Malfunctionable
public void timePassing(double time) throws BuildingException
time
- amount of time passing (in millisols)
BuildingException
- if error occurs.public double getFullPowerRequired()
public double getPoweredDownPowerRequired()
public java.lang.String getPowerMode()
public void setPowerMode(java.lang.String powerMode)
public MalfunctionManager getMalfunctionManager()
getMalfunctionManager
in interface Malfunctionable
public java.util.Collection<Person> getAffectedPeople()
getAffectedPeople
in interface Malfunctionable
public Inventory getInventory()
getInventory
in interface Malfunctionable
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |