net.sf.freecol.common.model
Class MarketData

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.model.MarketData

public class MarketData
extends FreeColObject

Objects of this class hold the market data for a particular type of good.


Field Summary
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Constructor Summary
MarketData()
          Package constructor: This class is only supposed to be constructed by Market.
MarketData(GoodsType goodsType)
          Creates a new MarketData instance.
 
Method Summary
 int getAmountInMarket()
          Get the AmountInMarket value.
 int getArrears()
          Get the Arrears value.
 int getCostToBuy()
          Get the CostToBuy value.
 GoodsType getGoodsType()
          Get the type of goods of this MarketData.
 int getIncomeAfterTaxes()
          Get the IncomeAfterTaxes value.
 int getIncomeBeforeTaxes()
          Get the IncomeBeforeTaxes value.
 int getInitialPrice()
          Get the InitialPrice value.
 int getOldPrice()
          Get the old price in this MarketData.
 int getPaidForSale()
          Get the PaidForSale value.
 int getSales()
          Get the Sales value.
 boolean getTraded()
          Has there been trading in this MarketData?
static java.lang.String getXMLElementTagName()
          Returns the tag name of the root element representing this object.
 void setAmountInMarket(int newAmountInMarket)
          Set the AmountInMarket value.
 void setArrears(int newArrears)
          Set the Arrears value.
 void setCostToBuy(int newCostToBuy)
          Set the CostToBuy value.
 void setIncomeAfterTaxes(int newIncomeAfterTaxes)
          Set the IncomeAfterTaxes value.
 void setIncomeBeforeTaxes(int newIncomeBeforeTaxes)
          Set the IncomeBeforeTaxes value.
 void setInitialPrice(int newInitialPrice)
          Set the InitialPrice value.
 void setOldPrice(int oldPrice)
          Set the old price in this MarketData.
 void setPaidForSale(int newPaidForSale)
          Set the PaidForSale value.
 void setSales(int newSales)
          Set the Sales value.
 void setTraded(boolean traded)
          Set the trade status of this MarketData.
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarketData

public MarketData()
Package constructor: This class is only supposed to be constructed by Market.


MarketData

public MarketData(GoodsType goodsType)
Creates a new MarketData instance.

Parameters:
goodsType - a GoodsType value
Method Detail

getCostToBuy

public final int getCostToBuy()
Get the CostToBuy value.

Returns:
an int value

setCostToBuy

public final void setCostToBuy(int newCostToBuy)
Set the CostToBuy value.

Parameters:
newCostToBuy - The new CostToBuy value.

getPaidForSale

public final int getPaidForSale()
Get the PaidForSale value.

Returns:
an int value

setPaidForSale

public final void setPaidForSale(int newPaidForSale)
Set the PaidForSale value.

Parameters:
newPaidForSale - The new PaidForSale value.

getAmountInMarket

public final int getAmountInMarket()
Get the AmountInMarket value.

Returns:
an int value

setAmountInMarket

public final void setAmountInMarket(int newAmountInMarket)
Set the AmountInMarket value.

Parameters:
newAmountInMarket - The new AmountInMarket value.

getInitialPrice

public final int getInitialPrice()
Get the InitialPrice value.

Returns:
an int value

setInitialPrice

public final void setInitialPrice(int newInitialPrice)
Set the InitialPrice value.

Parameters:
newInitialPrice - The new InitialPrice value.

getArrears

public final int getArrears()
Get the Arrears value.

Returns:
an int value

setArrears

public final void setArrears(int newArrears)
Set the Arrears value.

Parameters:
newArrears - The new Arrears value.

getSales

public final int getSales()
Get the Sales value.

Returns:
an int value

setSales

public final void setSales(int newSales)
Set the Sales value.

Parameters:
newSales - The new Sales value.

getIncomeBeforeTaxes

public final int getIncomeBeforeTaxes()
Get the IncomeBeforeTaxes value.

Returns:
an int value

setIncomeBeforeTaxes

public final void setIncomeBeforeTaxes(int newIncomeBeforeTaxes)
Set the IncomeBeforeTaxes value.

Parameters:
newIncomeBeforeTaxes - The new IncomeBeforeTaxes value.

getIncomeAfterTaxes

public final int getIncomeAfterTaxes()
Get the IncomeAfterTaxes value.

Returns:
an int value

setIncomeAfterTaxes

public final void setIncomeAfterTaxes(int newIncomeAfterTaxes)
Set the IncomeAfterTaxes value.

Parameters:
newIncomeAfterTaxes - The new IncomeAfterTaxes value.

getOldPrice

public final int getOldPrice()
Get the old price in this MarketData.

Returns:
The old price.

setOldPrice

public void setOldPrice(int oldPrice)
Set the old price in this MarketData.

Parameters:
oldPrice - A `new' old price.

getTraded

public final boolean getTraded()
Has there been trading in this MarketData?

Returns:
Whether trading has occurred.

setTraded

public void setTraded(boolean traded)
Set the trade status of this MarketData.

Parameters:
traded - The trade status to set.

getGoodsType

public final GoodsType getGoodsType()
Get the type of goods of this MarketData.

Returns:
The goods type for this data.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Returns the tag name of the root element representing this object.

Returns:
the tag name.