|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mars_sim.msp.simulation.structure.goods.GoodsManager
public class GoodsManager
A manager for goods values at a settlement.
Field Summary | |
---|---|
static java.lang.String |
GOODS_VALUE_EVENT
|
Constructor Summary | |
---|---|
GoodsManager(Settlement settlement)
Constructor |
Method Summary | |
---|---|
double |
getAmountOfGoodForSettlement(Good good)
Gets the amount of a good at the settlement. |
double |
getGoodValuePerItem(Good good)
Gets the value per item of a good. |
double |
getGoodValuePerItem(Good good,
double supply)
|
double |
getGoodValuePerMass(Good good)
Gets the value per mass of a good. |
double |
getGoodValuePerMass(Good good,
double supply)
|
double |
getNumberOfGoodForSettlement(Good good)
Gets the number of a good at the settlement. |
void |
timePassing(double time)
Time passing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GOODS_VALUE_EVENT
Constructor Detail |
---|
public GoodsManager(Settlement settlement) throws java.lang.Exception
settlement
- the settlement this manager is for.
java.lang.Exception
- if errors constructing instance.Method Detail |
---|
public double getGoodValuePerMass(Good good)
good
- the good to check value for.
public double getGoodValuePerMass(Good good, double supply) throws java.lang.Exception
java.lang.Exception
public double getGoodValuePerItem(Good good) throws java.lang.Exception
good
- the good to check.
java.lang.Exception
- if error getting value.public double getGoodValuePerItem(Good good, double supply) throws java.lang.Exception
java.lang.Exception
public void timePassing(double time) throws java.lang.Exception
time
- the amount of time passing (millisols).
java.lang.Exception
- if error during time.public double getNumberOfGoodForSettlement(Good good) throws InventoryException
good
- the good to check.
InventoryException
- if error determining the number of the good.public double getAmountOfGoodForSettlement(Good good) throws java.lang.Exception
good
- the good to check.
java.lang.Exception
- if error determining amount of the good.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |