|
||||||||||
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
net.sf.freecol.server.ai.GoodsWish
public class GoodsWish
Represents the need for goods within a Colony
.
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
GoodsWish(AIMain aiMain,
org.w3c.dom.Element element)
Creates a new GoodsWish from the given XML-representation. |
|
GoodsWish(AIMain aiMain,
Location destination,
int value,
GoodsType goodsType)
Creates a new GoodsWish , using a standard request amount of 100. |
|
GoodsWish(AIMain aiMain,
Location destination,
int value,
int amountRequested,
GoodsType goodsType)
Creates a new GoodsWish . |
|
GoodsWish(AIMain aiMain,
java.lang.String id)
Creates a new GoodsWish . |
|
GoodsWish(AIMain aiMain,
javax.xml.stream.XMLStreamReader in)
Creates a new GoodsWish . |
Method Summary | |
---|---|
int |
getGoodsAmount()
|
GoodsType |
getGoodsType()
Returns the type of unit needed for releasing this wish. |
static java.lang.String |
getXMLElementTagName()
Returns the tag name of the root element representing this object. |
java.lang.String |
toString()
|
Methods inherited from class net.sf.freecol.server.ai.Wish |
---|
dispose, getDestination, getTransportable, setTransportable, shouldBeStored |
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, isUninitialized, readFromXML |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GoodsWish(AIMain aiMain, Location destination, int value, int amountRequested, GoodsType goodsType)
GoodsWish
.
aiMain
- The main AI-object.destination
- The Location
in which the
transportable
assigned to
this GoodsWish
will have to reach.value
- The value identifying the importance of
this Wish
.amountRequested
- The amount requested.goodsType
- The type of goods needed for releasing this wish
completly.public GoodsWish(AIMain aiMain, Location destination, int value, GoodsType goodsType)
GoodsWish
, using a standard request amount of 100.
Possible TODO: Deprecate this in favor of the constructor without std amount?
aiMain
- The main AI-object.destination
- The Location
in which the
transportable
assigned to
this GoodsWish
will have to reach.value
- The value identifying the importance of
this Wish
.goodsType
- The type of goods needed for releasing this wish
completly.public GoodsWish(AIMain aiMain, org.w3c.dom.Element element)
GoodsWish
from the given XML-representation.
aiMain
- The main AI-object.element
- The root element for the XML-representation of a GoodsWish
.public GoodsWish(AIMain aiMain, java.lang.String id)
GoodsWish
.
aiMain
- The main AI-object.id
- The unique ID of this object.public GoodsWish(AIMain aiMain, javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
GoodsWish
.
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 GoodsType getGoodsType()
type of unit
.public int getGoodsAmount()
public static java.lang.String getXMLElementTagName()
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 |