|
||||||||||
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
public class FreeColGameObjectType
The base class for all types defined by the specification. It can be instantiated in order to provide a source for modifiers and abilities that are provided by the code rather than defined in the specification, such as the "artillery in the open" penalty.
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
FreeColGameObjectType()
|
|
FreeColGameObjectType(java.lang.String id)
|
Method Summary | |
---|---|
void |
addAbility(Ability ability)
|
void |
addModifier(Modifier modifier)
|
FeatureContainer |
getFeatureContainer()
Get the FeatureContainer value. |
int |
getIndex()
|
java.util.Set<Modifier> |
getModifierSet(java.lang.String id)
|
boolean |
hasAbility(java.lang.String id)
Describe hasAbility method here. |
boolean |
hasAbility(java.lang.String id,
FreeColGameObjectType type)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readFromXML(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
setFeatureContainer(FeatureContainer newFeatureContainer)
Set the FeatureContainer value. |
void |
setIndex(int index)
|
java.lang.String |
toString()
Use only for debugging purposes! A human-readable and localized name is returned by getName(). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FreeColGameObjectType()
public FreeColGameObjectType(java.lang.String id)
Method Detail |
---|
public final FeatureContainer getFeatureContainer()
FeatureContainer
value.
FeatureContainer
valuepublic final void setFeatureContainer(FeatureContainer newFeatureContainer)
FeatureContainer
value.
newFeatureContainer
- The new FeatureContainer value.public final void setIndex(int index)
public final int getIndex()
public boolean hasAbility(java.lang.String id)
FreeColObject
hasAbility
method here.
hasAbility
in class FreeColObject
id
- a String
value
boolean
valuepublic boolean hasAbility(java.lang.String id, FreeColGameObjectType type)
public void addAbility(Ability ability)
public void addModifier(Modifier modifier)
public java.util.Set<Modifier> getModifierSet(java.lang.String id)
public void readFromXML(javax.xml.stream.XMLStreamReader in, Specification specification) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in, Specification specification) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |