|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Utility
Represents a utility that provides energy.
Field Summary | |
static int |
ELECTRICITY
|
static int |
GAS
|
Constructor Summary | |
Utility(int type,
double rate,
java.lang.String name)
Creates an instance of the Utility class. |
Method Summary | |
double |
getCO2(double kwh)
Returns the amount of CO2 (in Kg) emitted for this Utility, given an amount of delivered energy, in kwh. |
double |
getCost(double kwh)
Returns the cost (in dollars) of energy used, given type of energy, and amount used, in Kwh. |
double |
getNOX(double kwh)
|
double |
getRate(int type)
Return utility cost in dollars per Kwh. |
double |
getSO2(double kwh)
|
int |
getType()
Return the type of energy (eg Utility.ELECTRICITY or Utility.GAS) provided by this utility. |
double |
getVOC(double kwh)
|
void |
setRate(int type,
double val)
Set the utility rate for this utility. |
void |
setType(int type)
Set th type of energy (eg Utility.ELECTRICITY or Utility.GAS) provided by this utility. |
void |
setUtilityCO2(double val)
Sets the amount of CO2 (in Kg) emitted per Kwh for this Utility. |
void |
setUtilityNOX(double val)
|
void |
setUtilitySO2(double val)
|
void |
setUtilityVOC(double val)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int GAS
public static final int ELECTRICITY
Constructor Detail |
public Utility(int type, double rate, java.lang.String name)
Creates an instance of the Utility class.
Method Detail |
public int getType()
public void setType(int type)
public double getRate(int type)
public void setRate(int type, double val)
public double getCost(double kwh)
public double getCO2(double kwh)
public void setUtilityCO2(double val)
public double getNOX(double kwh)
public void setUtilityNOX(double val)
public double getSO2(double kwh)
public void setUtilitySO2(double val)
public double getVOC(double kwh)
public void setUtilityVOC(double val)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |