|
|||||||||
| 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 | |
|---|---|
protected FeatureContainer |
featureContainer
Describe featureContainer here. |
private int |
index
|
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE |
| 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)
|
protected void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
protected FreeColObject |
readChild(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readFromXML(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
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(). |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int index
protected FeatureContainer featureContainer
| 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)
FreeColObjecthasAbility method here.
hasAbility in class FreeColObjectid - a String value
boolean value
public 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)
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
FreeColObject
toXMLImpl in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
FreeColObject
readFromXMLImpl in class FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
public void readFromXML(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
protected void readAttributes(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
protected FreeColObject readChild(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic 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 | ||||||||