|
|||||||||
| 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.BuildableType
public abstract class BuildableType
Contains information on buildable types.
| Field Summary | |
|---|---|
private java.util.List<AbstractGoods> |
goodsRequired
A list of AbstractGoods required to build this type. |
private java.util.List<Limit> |
limits
Limits on the production of this type. |
static java.lang.String |
NOTHING
|
private int |
populationRequired
The minimum population that a Colony needs in order to build this type. |
private java.util.Map<java.lang.String,java.lang.Boolean> |
requiredAbilities
Stores the abilities required by this Type. |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, logger, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
BuildableType(java.lang.String id,
Specification specification)
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.Boolean> |
getAbilitiesRequired()
Returns the abilities required by this Type. |
int |
getAmountRequiredOf(GoodsType type)
Get amount required of given GoodsType |
java.util.List<AbstractGoods> |
getGoodsRequired()
Get the GoodsRequired value. |
java.util.List<Limit> |
getLimits()
Get the Limits value. |
int |
getPopulationRequired()
Get the PopulationRequired value. |
boolean |
needsGoodsToBuild()
Does this buildable need goods to build? |
protected void |
readChild(javax.xml.stream.XMLStreamReader in)
Reads a child object. |
void |
setGoodsRequired(java.util.List<AbstractGoods> newGoodsRequired)
Set the GoodsRequired value. |
void |
setLimits(java.util.List<Limit> newLimits)
Set the Limits value. |
void |
setPopulationRequired(int newPopulationRequired)
Set the PopulationRequired value. |
protected void |
writeAttributes(javax.xml.stream.XMLStreamWriter out)
Write the attributes of this object to a stream. |
protected void |
writeChildren(javax.xml.stream.XMLStreamWriter out)
Write the children of this object to a stream. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, applyDifficultyLevel, getDescriptionKey, getFeatureContainer, getIndex, getModifierIndex, getModifierIndex, getModifierSet, getNameKey, getSpecification, hasAbility, hasAbility, isAbstractType, readAttributes, readChildren, setAbstractType, setFeatureContainer, setIndex, setModifierIndex, setSpecification, toString, toXMLImpl, toXMLImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NOTHING
private int populationRequired
private java.util.List<Limit> limits
private java.util.List<AbstractGoods> goodsRequired
private final java.util.Map<java.lang.String,java.lang.Boolean> requiredAbilities
| Constructor Detail |
|---|
public BuildableType(java.lang.String id,
Specification specification)
| Method Detail |
|---|
public final java.util.List<AbstractGoods> getGoodsRequired()
GoodsRequired value.
List valuepublic final int getAmountRequiredOf(GoodsType type)
GoodsType
public final void setGoodsRequired(java.util.List<AbstractGoods> newGoodsRequired)
GoodsRequired value.
newGoodsRequired - The new GoodsRequired value.public boolean needsGoodsToBuild()
public int getPopulationRequired()
PopulationRequired value.
int valuepublic void setPopulationRequired(int newPopulationRequired)
PopulationRequired value.
newPopulationRequired - The new PopulationRequired value.public final java.util.List<Limit> getLimits()
Limits value.
List valuepublic final void setLimits(java.util.List<Limit> newLimits)
Limits value.
newLimits - The new Limits value.public java.util.Map<java.lang.String,java.lang.Boolean> getAbilitiesRequired()
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeAttributes in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
protected void writeChildren(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeChildren in class FreeColGameObjectTypeout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.
protected void readChild(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readChild in class FreeColGameObjectTypein - The XML stream to read.
javax.xml.stream.XMLStreamException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||