eos.market
Class CapitalMarket

java.lang.Object
  extended by eos.market.Market
      extended by eos.market.CapitalMarket

public class CapitalMarket
extends Market

A market trading capital good


Field Summary
 
Fields inherited from class eos.market.Market
good
 
Constructor Summary
CapitalMarket()
          Create a new capital market
 
Method Summary
 void addBuyOffer(Capital capital, int qty)
          Add a buy offer
 void addSellOffer(CFirm seller, double price, int capacity)
          Add a sell offer
 void clear()
          Clear the market
static double getCapitalPrice()
          Return price of a machine (principle, in dollars)
static double getDemandForCapital()
          Return demand for capital (in machines)
 double getLastMktGoodVol()
          Return volume of capital good traded
static int getNewThisStep()
          Return number of new machines bought this step
 
Methods inherited from class eos.market.Market
getGood
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapitalMarket

public CapitalMarket()
Create a new capital market

Method Detail

addBuyOffer

public void addBuyOffer(Capital capital,
                        int qty)
Add a buy offer

Parameters:
capital - a reference to the capital stock owned by the buyer

qty - quantity of machines to buy

addSellOffer

public void addSellOffer(CFirm seller,
                         double price,
                         int capacity)
Add a sell offer

Parameters:
seller -

price - per-step price of each unit

capacity - max quantity of capital available for sale

clear

public void clear()
Clear the market

Specified by:
clear in class Market

getLastMktGoodVol

public double getLastMktGoodVol()
Return volume of capital good traded

Returns:
volume of capital good traded

getNewThisStep

public static int getNewThisStep()
Return number of new machines bought this step

Returns:
number of new machines bought this step

getDemandForCapital

public static double getDemandForCapital()
Return demand for capital (in machines)

Returns:
demand for capital (in machines)

getCapitalPrice

public static double getCapitalPrice()
Return price of a machine (principle, in dollars)

Returns:
price of a machine (principle, in dollars)