|
|||||||||
| 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
net.sf.freecol.server.ai.ValuedAIObject
net.sf.freecol.server.ai.Wish
public abstract class Wish
Represents a need for something at a given Location.
| Field Summary | |
|---|---|
protected Location |
destination
|
private static java.util.logging.Logger |
logger
|
protected Transportable |
transportable
The Transportable which will realize the wish,
or null if no Transportable has
been chosen. |
| Fields inherited from class net.sf.freecol.server.ai.AIObject |
|---|
uninitialized |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
Wish(AIMain aiMain,
org.w3c.dom.Element element)
Creates a new Wish from the given XML-representation. |
|
Wish(AIMain aiMain,
java.lang.String id)
Creates a new Wish. |
|
Wish(AIMain aiMain,
javax.xml.stream.XMLStreamReader in)
Creates a new Wish from the given XML-representation. |
|
| Method Summary | |
|---|---|
void |
attachToDestination()
Attaches this wish to its destination AI colony, if any. |
void |
dispose()
Disposes this AIObject by removing
any referances to this object. |
Location |
getDestination()
Gets the destination of this Wish. |
AIColony |
getDestinationAIColony()
Gets the destination AI colony, if any. |
Transportable |
getTransportable()
Gets the Transportable assigned to this Wish. |
void |
setTransportable(Transportable transportable)
Assigns a Transportable to this Wish. |
boolean |
shouldBeStored()
Checks if this Wish needs to be stored in a savegame. |
| Methods inherited from class net.sf.freecol.server.ai.ValuedAIObject |
|---|
compareTo, getValue, setValue |
| Methods inherited from class net.sf.freecol.server.ai.AIObject |
|---|
getAIMain, getGame, getSpecification, getXMLElementTagName, isUninitialized, readFromXML |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
protected Location destination
protected Transportable transportable
Transportable which will realize the wish,
or null if no Transportable has
been chosen.
| Constructor Detail |
|---|
public Wish(AIMain aiMain,
java.lang.String id)
Wish.
aiMain - The main AI-object.id - The unique ID of this object.
public Wish(AIMain aiMain,
org.w3c.dom.Element element)
Wish from the given XML-representation.
aiMain - The main AI-object.element - The root element for the XML-representation
of a Wish.
public Wish(AIMain aiMain,
javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
Wish from the given XML-representation.
aiMain - The main AI-object.in - The input stream containing the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.| Method Detail |
|---|
public boolean shouldBeStored()
Wish needs to be stored in a savegame.
public void setTransportable(Transportable transportable)
Transportable to this Wish.
transportable - The Transportable which should
realize this wish.getTransportable(),
WishRealizationMissionpublic Transportable getTransportable()
Transportable assigned to this Wish.
Transportable which will realize this wish,
or null if none has been assigned.setTransportable(net.sf.freecol.server.ai.Transportable),
WishRealizationMissionpublic void dispose()
AIObject by removing
any referances to this object.
dispose in class AIObjectpublic Location getDestination()
Wish.
Location in which the
transportable assigned to
this Wish will have to reach.public AIColony getDestinationAIColony()
AIColony.public void attachToDestination()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||