|
||||||||||
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.server.ai.AIObject
public abstract class AIObject
An AIObject
contains AI-related information and methods.
Each FreeColGameObject
, that is owned by an AI-controlled
player, can have a single AIObject
attached to it.
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
AIObject(AIMain aiMain)
Creates a new AIObject . |
|
AIObject(AIMain aiMain,
java.lang.String id)
Creates a new AIObject and registers
this object with AIMain . |
Method Summary | |
---|---|
void |
dispose()
Disposes this AIObject by removing
any referances to this object. |
AIMain |
getAIMain()
Returns the main AI-object. |
Game |
getGame()
Returns the game. |
static java.lang.String |
getXMLElementTagName()
Returns the tag name of the root element representing this object. |
boolean |
isUninitialized()
Checks if this AIObject
is uninitialized. |
void |
readFromXML(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AIObject(AIMain aiMain)
AIObject
.
aiMain
- The main AI-object.public AIObject(AIMain aiMain, java.lang.String id)
AIObject
and registers
this object with AIMain
.
aiMain
- The main AI-object.id
- The unique identifier.AIMain.addAIObject(String, AIObject)
Method Detail |
---|
public AIMain getAIMain()
AIMain
.public boolean isUninitialized()
AIObject
is uninitialized. That is: it has been referenced
by another object, but has not yet been updated with
readFromXML(javax.xml.stream.XMLStreamReader)
.
true
if this object is not initialized.public final void readFromXML(javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
readFromXML
in class FreeColObject
in
- The input stream containing the XML.
javax.xml.stream.XMLStreamException
- if a problem was encountered
during parsing.public void dispose()
AIObject
by removing
any referances to this object.
public Game getGame()
Game
.public static java.lang.String getXMLElementTagName()
String
"unknown".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |