|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.PersistentObject
net.sf.freecol.common.model.DiplomaticTrade
public class DiplomaticTrade
The class DiplomaticTrade represents an offer one player can
make another.
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
LICENSE
|
static java.lang.String |
REVISION
|
| Constructor Summary | |
|---|---|
DiplomaticTrade(Game game)
|
|
| Method Summary | |
|---|---|
void |
add(TradeItem newItem)
Add a TradeItem to the DiplomaticTrade. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
java.util.Iterator<TradeItem> |
iterator()
Returns an iterator for all TradeItems. |
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
void |
remove(TradeItem newItem)
Remove a TradeItem from the DiplomaticTrade. |
void |
toXML(javax.xml.stream.XMLStreamWriter out,
Player player)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class net.sf.freecol.common.model.PersistentObject |
|---|
readFromArrayElement, readFromXML, readFromXMLElement, toArrayElement, toXMLElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String LICENSE
public static final java.lang.String REVISION
| Constructor Detail |
|---|
public DiplomaticTrade(Game game)
| Method Detail |
|---|
public void add(TradeItem newItem)
newItem - a TradeItem valuepublic void remove(TradeItem newItem)
newItem - a TradeItem valuepublic java.util.Iterator<TradeItem> iterator()
protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class PersistentObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered during parsing.
public void toXML(javax.xml.stream.XMLStreamWriter out,
Player player)
throws javax.xml.stream.XMLStreamException
Player will be added
to that representation if showAll is set to
false.
toXML in class PersistentObjectout - The target stream.player - The Player this XML-representation should be
made for, or null if
showAll == true.
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 | ||||||||