|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.MarketData
public class MarketData
Objects of this class hold the market data for a particular type of good.
| Field Summary | |
|---|---|
private int |
amountInMarket
Describe amountInMarket here. |
private int |
arrears
Describe arrears here. |
private int |
costToBuy
Describe costToBuy here. |
private int |
incomeAfterTaxes
Describe incomeAfterTaxes here. |
private int |
incomeBeforeTaxes
Describe incomeBeforeTaxes here. |
private int |
initialPrice
Describe initialPrice here. |
private int |
oldPrice
Place to save to old price so as to be able to tell when a price change message should be generated. |
private int |
paidForSale
Describe paidForSale here. |
private int |
sales
Describe sales here. |
private boolean |
traded
Has this good been traded? |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE |
| 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. |
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of 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. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int costToBuy
private int paidForSale
private int amountInMarket
private int initialPrice
private int arrears
private int sales
private int incomeBeforeTaxes
private int incomeAfterTaxes
private int oldPrice
private boolean traded
| Constructor Detail |
|---|
public MarketData()
Market.
public MarketData(GoodsType goodsType)
MarketData instance.
goodsType - a GoodsType value| Method Detail |
|---|
public final int getCostToBuy()
CostToBuy value.
int valuepublic final void setCostToBuy(int newCostToBuy)
CostToBuy value.
newCostToBuy - The new CostToBuy value.public final int getPaidForSale()
PaidForSale value.
int valuepublic final void setPaidForSale(int newPaidForSale)
PaidForSale value.
newPaidForSale - The new PaidForSale value.public final int getAmountInMarket()
AmountInMarket value.
int valuepublic final void setAmountInMarket(int newAmountInMarket)
AmountInMarket value.
newAmountInMarket - The new AmountInMarket value.public final int getInitialPrice()
InitialPrice value.
int valuepublic final void setInitialPrice(int newInitialPrice)
InitialPrice value.
newInitialPrice - The new InitialPrice value.public final int getArrears()
Arrears value.
int valuepublic final void setArrears(int newArrears)
Arrears value.
newArrears - The new Arrears value.public final int getSales()
Sales value.
int valuepublic final void setSales(int newSales)
Sales value.
newSales - The new Sales value.public final int getIncomeBeforeTaxes()
IncomeBeforeTaxes value.
int valuepublic final void setIncomeBeforeTaxes(int newIncomeBeforeTaxes)
IncomeBeforeTaxes value.
newIncomeBeforeTaxes - The new IncomeBeforeTaxes value.public final int getIncomeAfterTaxes()
IncomeAfterTaxes value.
int valuepublic final void setIncomeAfterTaxes(int newIncomeAfterTaxes)
IncomeAfterTaxes value.
newIncomeAfterTaxes - The new IncomeAfterTaxes value.public final int getOldPrice()
MarketData.
public void setOldPrice(int oldPrice)
MarketData.
oldPrice - A `new' old price.public final boolean getTraded()
MarketData?
public void setTraded(boolean traded)
MarketData.
traded - The trade status to set.public final GoodsType getGoodsType()
MarketData.
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
Player will
be added to that representation if showAll is
set to false.
toXMLImpl in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||