net.sf.freecol.common.model
Class BuildingType

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.model.FreeColGameObjectType
          extended by net.sf.freecol.common.model.BuildableType
              extended by net.sf.freecol.common.model.BuildingType

public final class BuildingType
extends BuildableType

Contains information on building types, like the number of upgrade levels a given building type can have. The levels contain the information about the name of the building in a given level and what is needed to build it.


Field Summary
 
Fields inherited from class net.sf.freecol.common.model.BuildableType
NOTHING, UNDEFINED
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Constructor Summary
BuildingType(int index)
           
 
Method Summary
 boolean canAdd(UnitType unitType)
           
 int getBasicProduction()
           
 GoodsType getConsumedGoodsType()
           
 BuildingType getFirstLevel()
           
 java.awt.Image getImage()
           
 int getLevel()
           
 GoodsType getProducedGoodsType()
           
 Modifier getProductionModifier()
           
 int getSequence()
           
 FreeColGameObjectType getType()
           
 BuildingType getUpgradesFrom()
           
 BuildingType getUpgradesTo()
           
 int getWorkPlaces()
           
static java.lang.String getXMLElementTagName()
          Gets the tag name of the root element representing this object.
 void readAttributes(javax.xml.stream.XMLStreamReader in, Specification specification)
           
 
Methods inherited from class net.sf.freecol.common.model.BuildableType
getAbilitiesRequired, getAmountRequiredOf, getGoodsRequired, getGoodsRequiredAsString, getPopulationRequired, setGoodsRequired, setPopulationRequired
 
Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readChildren, readFromXML, setFeatureContainer, setIndex, toString
 
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, 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, wait, wait, wait
 

Constructor Detail

BuildingType

public BuildingType(int index)
Method Detail

getUpgradesFrom

public BuildingType getUpgradesFrom()

getUpgradesTo

public BuildingType getUpgradesTo()

getImage

public java.awt.Image getImage()

getFirstLevel

public BuildingType getFirstLevel()

getWorkPlaces

public int getWorkPlaces()

getBasicProduction

public int getBasicProduction()

getConsumedGoodsType

public GoodsType getConsumedGoodsType()

getProducedGoodsType

public GoodsType getProducedGoodsType()

getLevel

public int getLevel()

getSequence

public int getSequence()

getType

public FreeColGameObjectType getType()

getProductionModifier

public Modifier getProductionModifier()

readAttributes

public void readAttributes(javax.xml.stream.XMLStreamReader in,
                           Specification specification)
                    throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Gets the tag name of the root element representing this object. This method should be overwritten by any sub-class, preferably with the name of the class with the first letter in lower case.

Returns:
"building-type".

canAdd

public boolean canAdd(UnitType unitType)