net.sf.freecol.common.model
Class TradeRouteStop

java.lang.Object
  extended by net.sf.freecol.common.model.TradeRouteStop

public class TradeRouteStop
extends java.lang.Object


Field Summary
private  java.util.List<AbstractGoods> goodsToLoad
          The AbstractGoods to load in this Location.
private  java.util.List<AbstractGoods> goodsToUnload
          The AbstractGoods to unload in this Location.
private  Location location
           
private  boolean modified
          Whether the stop has been modified.
 
Constructor Summary
TradeRouteStop(Location location)
          Creates a new TradeRouteStop instance.
 
Method Summary
 java.util.List<AbstractGoods> getGoodsToLoad()
          Get the GoodsToLoad value.
 java.util.List<AbstractGoods> getGoodsToUnload()
          Get the GoodsToUnload value.
 Location getLocation()
          Get the Location value.
static java.lang.String getXMLElementTagName()
          Returns the tag name of the root element representing this object.
 boolean isModified()
          Get the Modified value.
protected  void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
          Initialize this object from an XML-representation of this object.
protected  void readFromXMLImpl(javax.xml.stream.XMLStreamReader in, Game game)
          Initialize this object from an XML-representation of this object.
 void setGoodsToLoad(java.util.List<AbstractGoods> newGoodsToLoad)
          Set the GoodsToLoad value.
 void setGoodsToUnload(java.util.List<AbstractGoods> newGoodsToUnload)
          Set the GoodsToUnload value.
 void setLocation(Location newLocation)
          Set the Location value.
 void setModified(boolean newModified)
          Set the Modified value.
 java.lang.String toString()
           
 void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

location

private Location location

modified

private boolean modified
Whether the stop has been modified. This is of interest only to the client and can be ignored for XML serialization.


goodsToUnload

private java.util.List<AbstractGoods> goodsToUnload
The AbstractGoods to unload in this Location.


goodsToLoad

private java.util.List<AbstractGoods> goodsToLoad
The AbstractGoods to load in this Location.

Constructor Detail

TradeRouteStop

public TradeRouteStop(Location location)
Creates a new TradeRouteStop instance.

Parameters:
location - a Location value
Method Detail

getGoodsToLoad

public final java.util.List<AbstractGoods> getGoodsToLoad()
Get the GoodsToLoad value.

Returns:
a List value

setGoodsToLoad

public final void setGoodsToLoad(java.util.List<AbstractGoods> newGoodsToLoad)
Set the GoodsToLoad value.

Parameters:
newGoodsToLoad - The new GoodsToLoad value.

getGoodsToUnload

public final java.util.List<AbstractGoods> getGoodsToUnload()
Get the GoodsToUnload value.

Returns:
a List value

setGoodsToUnload

public final void setGoodsToUnload(java.util.List<AbstractGoods> newGoodsToUnload)
Set the GoodsToUnload value.

Parameters:
newGoodsToUnload - The new GoodsToUnload value.

isModified

public final boolean isModified()
Get the Modified value.

Returns:
a boolean value

setModified

public final void setModified(boolean newModified)
Set the Modified value.

Parameters:
newModified - The new Modified value.

getLocation

public final Location getLocation()
Get the Location value.

Returns:
a Location value

setLocation

public void setLocation(Location newLocation)
Set the Location value.

Parameters:
newLocation - a Location value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXMLImpl

public void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
               throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

readFromXMLImpl

protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
                        throws javax.xml.stream.XMLStreamException
Initialize this object from an XML-representation of this object.

Parameters:
in - The input stream with the XML.
Throws:
javax.xml.stream.XMLStreamException - is thrown if something goes wrong.

readFromXMLImpl

protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in,
                               Game game)
                        throws javax.xml.stream.XMLStreamException
Initialize this object from an XML-representation of this object.

Parameters:
in - The input stream with the XML.
Throws:
javax.xml.stream.XMLStreamException - is thrown if something goes wrong.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Returns the tag name of the root element representing this object.

Returns:
"tradeRoute".