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, readFromXMLImpl, setFeatureContainer, setIndex, toString, toXMLImpl |
| 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, readAttributes, readChildren, readFromArrayElement, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, setId, toArrayElement, toArrayElement, toListElement, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute, writeAttributes, writeChildren, writeFreeColGameObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
level
private int level
workPlaces
private int workPlaces
basicProduction
private int basicProduction
minSkill
private int minSkill
maxSkill
private int maxSkill
consumes
private GoodsType consumes
produces
private GoodsType produces
productionModifier
private Modifier productionModifier
upgradesFrom
private BuildingType upgradesFrom
upgradesTo
private BuildingType upgradesTo
sequence
private int sequence
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
- Overrides:
readAttributes in class BuildableType
- 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)