net.sf.freecol.common.model
Class ResourceType
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObjectType
net.sf.freecol.common.model.ResourceType
public final class ResourceType
- extends FreeColGameObjectType
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
addAbility, addModifier, applyDifficultyLevel, getDescriptionKey, getFeatureContainer, getIndex, getModifierIndex, getModifierIndex, getModifierSet, getNameKey, hasAbility, hasAbility, isAbstractType, readChild, readChildren, setAbstractType, setFeatureContainer, setIndex, setModifierIndex, toString, toXMLImpl, writeChildren |
| Methods inherited from class net.sf.freecol.common.model.FreeColObject |
addPropertyChangeListener, addPropertyChangeListener, dumpObject, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, getSpecification, hasAttribute, hasListeners, readAttributes, readChild, readChildren, readFromArrayElement, readFromArrayElement, readFromListElement, readFromXML, readFromXMLElement, readFromXMLImpl, readFromXMLImpl, readFromXMLPartialImpl, removePropertyChangeListener, removePropertyChangeListener, save, save, setId, setSpecification, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, toXMLPartialImpl, writeAttribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
minValue
private int minValue
maxValue
private int maxValue
ResourceType
public ResourceType(java.lang.String id,
Specification specification)
getMinValue
public int getMinValue()
getMaxValue
public int getMaxValue()
getProductionModifier
public java.util.Set<Modifier> getProductionModifier(GoodsType goodsType,
UnitType unitType)
getBestGoodsType
public GoodsType getBestGoodsType()
toXMLImpl
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
- Makes an XML-representation of this object.
- Overrides:
toXMLImpl in class FreeColGameObjectType
- Parameters:
out - The output stream.
- Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to the
stream.
writeAttributes
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
- Write the attributes of this object to a stream.
- Overrides:
writeAttributes in class FreeColObject
- Parameters:
out - The target stream.
- Throws:
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
readAttributes
protected void readAttributes(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
- Reads the attributes of this object from an XML stream.
- Overrides:
readAttributes in class FreeColGameObjectType
- Parameters:
in - The XML input stream.
- Throws:
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
getXMLElementTagName
public static java.lang.String getXMLElementTagName()
- Returns the tag name of the root element representing this object.
- Returns:
- "resource-type".