net.sf.freecol.common.model
Class BuildingType
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObjectType
net.sf.freecol.common.model.BuildableType
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.
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 |
BuildingType
public BuildingType(int index)
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)