|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objecteos.market.Market
eos.market.ConsumerGoodMarket
public class ConsumerGoodMarket
A market trading consumer goods.
Field Summary |
---|
Fields inherited from class eos.market.Market |
---|
good |
Constructor Summary | |
---|---|
ConsumerGoodMarket(String good,
double initLow,
double initHigh)
Create a new consumer good market trading a good named good |
Method Summary | |
---|---|
void |
addBuyOffer(Agent buyer,
Demand demand)
Add a buy offer |
void |
addSellOffer(Agent seller,
double qty)
Add a sell offer |
void |
clear()
Clear the market. |
double |
getLastMktGoodVol()
Return volume of good traded |
double |
getLastMktMoneyVol()
Return volume of money exchanged |
double |
getLastMktPrice()
Return market price |
double |
getLastMktSupply()
Return total supply |
Methods inherited from class eos.market.Market |
---|
getGood |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConsumerGoodMarket(String good, double initLow, double initHigh)
good
- name of the good traded in the market
initLow
- min initial price
initHigh
- max initial priceMethod Detail |
---|
public void addBuyOffer(Agent buyer, Demand demand)
buyer
- demand
- public void addSellOffer(Agent seller, double qty)
seller
- qty
- quantity of good available for salepublic void clear()
clear
in class Market
public double getLastMktPrice()
public double getLastMktGoodVol()
public double getLastMktMoneyVol()
public double getLastMktSupply()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |