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

java.lang.Object
  extended by org.mars_sim.msp.simulation.structure.building.function.PowerSource
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SolarPowerSource, StandardPowerSource

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

The PowerSource class represents a power generator for a building.

See Also:
Serialized Form

Constructor Summary
PowerSource(java.lang.String type, double maxPower)
          Constructor
 
Method Summary
abstract  double getCurrentPower(Building building)
          Gets the current power produced by the power source.
 double getMaxPower()
          Gets the max power generated.
 java.lang.String getType()
          Gets the type of power source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PowerSource

public PowerSource(java.lang.String type,
                   double maxPower)
Constructor

Parameters:
type - the type of power source.
maxPower - the max power generated.
Method Detail

getType

public java.lang.String getType()
Gets the type of power source.

Returns:
type

getMaxPower

public double getMaxPower()
Gets the max power generated.

Returns:
power (kW)

getCurrentPower

public abstract double getCurrentPower(Building building)
Gets the current power produced by the power source.

Parameters:
building - the building this power source is for.
Returns:
power (kW)