|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.core.structure.goods.GoodsManager
public class GoodsManager
A manager for goods values at a settlement.
| Field Summary | |
|---|---|
static String |
GOODS_VALUE_EVENT
|
| Constructor Summary | |
|---|---|
GoodsManager(Settlement settlement)
Constructor |
|
| Method Summary | |
|---|---|
void |
destroy()
Prepare object for garbage collection. |
double |
getGoodValuePerItem(Good good)
Gets the value per item of a good. |
double |
getGoodValuePerItem(Good good,
double supply)
|
double |
getNumberOfGoodForSettlement(Good good)
Gets the number of a good at the settlement. |
boolean |
isInitialized()
Checks if goods manager has been initialized. |
void |
timePassing(double time)
Time passing |
void |
updateGoodsValues()
Updates the values for all the goods at the settlement. |
void |
updateGoodValue(Good good,
boolean collectiveUpdate)
Updates the value of a good at the settlement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String GOODS_VALUE_EVENT
| Constructor Detail |
|---|
public GoodsManager(Settlement settlement)
settlement - the settlement this manager is for.
Exception - if errors constructing instance.| Method Detail |
|---|
public boolean isInitialized()
public double getGoodValuePerItem(Good good)
good - the good to check.
Exception - if error getting value.
public double getGoodValuePerItem(Good good,
double supply)
public void timePassing(double time)
time - the amount of time passing (millisols).
Exception - if error during time.public void updateGoodsValues()
Exception - if error updating goods values.
public void updateGoodValue(Good good,
boolean collectiveUpdate)
good - the good to update.collectiveUpdate - true if this update is part of a collective good value update.
Exception - if error updating good value.public double getNumberOfGoodForSettlement(Good good)
good - the good to check.
InventoryException - if error determining the number of the good.public void destroy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||