|
|||||||||
| 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.FreeColGameObjectType
net.sf.freecol.common.model.GoodsType
public final class GoodsType
| Field Summary | |
|---|---|
private int |
breedingNumber
The number of units required to breed this type of goods. |
private boolean |
buildingMaterial
Whether this type of goods is required for building. |
private boolean |
ignoreLimit
|
private int |
initialAmount
|
private int |
initialPrice
|
private boolean |
isFarmed
|
private boolean |
isFood
|
private GoodsType |
madeFrom
|
private GoodsType |
makes
|
private boolean |
militaryGoods
Whether this type of goods is required for building equipment that grants an offence bonus or defence bonus. |
private boolean |
newWorldGoods
|
static int |
NO_BREEDING
|
static int |
NO_PRICE
|
private int |
price
The price of this type of goods. |
private int |
priceDiff
|
private boolean |
storable
Whether this type of goods can be stored in a warehouse. |
private GoodsType |
storedAs
|
private boolean |
tradeGoods
Whether these are trade goods that can only be obtained in Europe. |
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
featureContainer |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
GoodsType(int index)
|
|
| Method Summary | |
|---|---|
int |
getBreedingNumber()
Get the BreedingNumber value. |
int |
getInitialAmount()
|
int |
getInitialBuyPrice()
|
int |
getInitialSellPrice()
|
int |
getPrice()
Get the Price value. |
int |
getPriceDifference()
|
GoodsType |
getProducedMaterial()
|
java.util.List<GoodsType> |
getProductionChain()
Returns the production chain of the goods type, beginning with a raw material that can not be produced from any other. |
GoodsType |
getRawMaterial()
|
GoodsType |
getStoredAs()
|
GoodsType |
inputType()
|
boolean |
isBreedable()
Returns true if this type of Goods is
breedable. |
boolean |
isBuildingMaterial()
Returns true if this type of goods is required for building a BuildableType. |
boolean |
isFarmed()
|
boolean |
isFoodType()
|
boolean |
isImmigrationGoodsType()
Whether this type of goods causes immigration. |
boolean |
isImmigrationType()
Get the ImmigrationType value. |
boolean |
isLibertyGoodsType()
Whether this type of goods produces liberty points. |
boolean |
isLibertyType()
Get the LibertyType value. |
boolean |
isMilitaryGoods()
Get the MilitaryGoods value. |
boolean |
isNewWorldGoodsType()
|
boolean |
isNewWorldLuxuryType()
|
boolean |
isRawBuildingMaterial()
Returns true if this type of goods is required for producing a type of goods required for building a BuildableType. |
boolean |
isRawMaterial()
|
boolean |
isRefined()
|
boolean |
isStorable()
|
boolean |
isStoredAs()
|
boolean |
isTradeGoods()
Get the TradeGoods value. |
boolean |
limitIgnored()
|
GoodsType |
outputType()
|
void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
setBreedingNumber(int newBreedingNumber)
Set the BreedingNumber value. |
void |
setBuildingMaterial(boolean newBuildingMaterial)
Set the BuildingMaterial value. |
void |
setMilitaryGoods(boolean newMilitaryGoods)
Set the MilitaryGoods value. |
void |
setPrice(int newPrice)
Set the Price value. |
void |
setTradeGoods(boolean newTradeGoods)
Set the TradeGoods value. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readChild, readFromXML, readFromXMLImpl, setFeatureContainer, setIndex, toString, toXMLImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NO_BREEDING
public static final int NO_PRICE
private boolean isFarmed
private boolean isFood
private boolean ignoreLimit
private boolean newWorldGoods
private boolean buildingMaterial
private boolean militaryGoods
private boolean tradeGoods
private boolean storable
private GoodsType madeFrom
private GoodsType makes
private GoodsType storedAs
private int initialAmount
private int initialPrice
private int priceDiff
private int breedingNumber
private int price
| Constructor Detail |
|---|
public GoodsType(int index)
| Method Detail |
|---|
public boolean isRawMaterial()
public boolean isRefined()
public GoodsType getRawMaterial()
public GoodsType getProducedMaterial()
public boolean isFarmed()
public boolean limitIgnored()
public boolean isNewWorldGoodsType()
public boolean isNewWorldLuxuryType()
public boolean isImmigrationType()
ImmigrationType value.
boolean valuepublic boolean isLibertyType()
LibertyType value.
boolean valuepublic boolean isStorable()
public boolean isStoredAs()
public GoodsType getStoredAs()
public int getInitialAmount()
public int getInitialSellPrice()
public int getInitialBuyPrice()
public int getPriceDifference()
public boolean isFoodType()
public GoodsType outputType()
public GoodsType inputType()
public boolean isBuildingMaterial()
boolean valueBuildableTypepublic void setBuildingMaterial(boolean newBuildingMaterial)
BuildingMaterial value.
newBuildingMaterial - The new BuildingMaterial value.public java.util.List<GoodsType> getProductionChain()
public boolean isRawBuildingMaterial()
boolean valueBuildableTypepublic boolean isMilitaryGoods()
MilitaryGoods value.
boolean valuepublic void setMilitaryGoods(boolean newMilitaryGoods)
MilitaryGoods value.
newMilitaryGoods - The new MilitaryGoods value.public boolean isTradeGoods()
TradeGoods value.
boolean valuepublic void setTradeGoods(boolean newTradeGoods)
TradeGoods value.
newTradeGoods - The new TradeGoods value.public boolean isLibertyGoodsType()
boolean valuepublic boolean isImmigrationGoodsType()
boolean valuepublic int getBreedingNumber()
BreedingNumber value.
int valuepublic void setBreedingNumber(int newBreedingNumber)
BreedingNumber value.
newBreedingNumber - The new BreedingNumber value.public boolean isBreedable()
true if this type of Goods is
breedable. This should only be true for animals, such as
horses.
boolean valuepublic int getPrice()
Price value.
int valuepublic void setPrice(int newPrice)
Price value.
newPrice - The new Price value.
public void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class FreeColGameObjectTypejavax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readChildren in class FreeColGameObjectTypejavax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||