|
||||||||||
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.TradeItem
net.sf.freecol.common.model.GoodsTradeItem
public class GoodsTradeItem
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
GoodsTradeItem(Game game,
Player source,
Player destination,
Goods goods,
Settlement settlement)
Creates a new GoodsTradeItem instance. |
|
GoodsTradeItem(Game game,
javax.xml.stream.XMLStreamReader in)
Creates a new GoodsTradeItem instance. |
Method Summary | |
---|---|
Goods |
getGoods()
Get the Goods value. |
Settlement |
getSettlement()
Get the Settlement value. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
boolean |
isUnique()
Returns whether this TradeItem must be unique. |
boolean |
isValid()
Returns whether this TradeItem is valid. |
java.util.List<FreeColGameObject> |
makeTrade()
Concludes the trade. |
void |
setGoods(Goods newGoods)
Set the Goods value. |
void |
setSettlement(Settlement newSettlement)
Set the Settlement value. |
void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
Methods inherited from class net.sf.freecol.common.model.TradeItem |
---|
getDestination, getGame, getSource, setDestination, setGame, setSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GoodsTradeItem(Game game, Player source, Player destination, Goods goods, Settlement settlement)
GoodsTradeItem
instance.
game
- a Game
valuesource
- a Player
valuedestination
- a Player
valuegoods
- a Goods
valuesettlement
- a Settlement
valuepublic GoodsTradeItem(Game game, javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
GoodsTradeItem
instance.
game
- a Game
valuein
- a XMLStreamReader
value
javax.xml.stream.XMLStreamException
Method Detail |
---|
public final Goods getGoods()
Goods
value.
Goods
valuepublic final void setGoods(Goods newGoods)
Goods
value.
newGoods
- The new Goods value.public final Settlement getSettlement()
Settlement
value.
Settlement
valuepublic final void setSettlement(Settlement newSettlement)
Settlement
value.
newSettlement
- The new Settlement value.public boolean isValid()
isValid
in class TradeItem
boolean
valuepublic boolean isUnique()
isUnique
in class TradeItem
boolean
valuepublic java.util.List<FreeColGameObject> makeTrade()
makeTrade
in class TradeItem
public void toXMLImpl(javax.xml.stream.XMLStreamWriter out) throws javax.xml.stream.XMLStreamException
toXMLImpl
in class TradeItem
out
- The target stream.
javax.xml.stream.XMLStreamException
- if there are any problems writing
to the stream.public static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |