net.sf.freecol.common.model
Class TradeRoute.Stop

java.lang.Object
  extended by net.sf.freecol.common.model.TradeRoute.Stop
Enclosing class:
TradeRoute

public class TradeRoute.Stop
extends java.lang.Object


Field Summary
private  java.util.ArrayList<GoodsType> cargo
           
private  java.lang.String locationId
           
private  boolean modified
          Whether the stop has been modified.
 
Constructor Summary
  TradeRoute.Stop(Location location)
           
private TradeRoute.Stop(TradeRoute.Stop other)
          Copy constructor.
private TradeRoute.Stop(javax.xml.stream.XMLStreamReader in)
           
 
Method Summary
 void addCargo(GoodsType newCargo)
           
 java.util.ArrayList<GoodsType> getCargo()
          Get the Cargo value.
 Location getLocation()
          Get the Location value.
 boolean isModified()
          Get the Modified value.
 void setCargo(java.util.ArrayList<GoodsType> cargo)
          Set the cargo values.
 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

locationId

private java.lang.String locationId

cargo

private java.util.ArrayList<GoodsType> cargo

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.

Constructor Detail

TradeRoute.Stop

public TradeRoute.Stop(Location location)

TradeRoute.Stop

private TradeRoute.Stop(TradeRoute.Stop other)
Copy constructor. Creates a stop based on the given one.

Parameters:
other -

TradeRoute.Stop

private TradeRoute.Stop(javax.xml.stream.XMLStreamReader in)
                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException
Method Detail

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

getCargo

public final java.util.ArrayList<GoodsType> getCargo()
Get the Cargo value.

Returns:
a cloned ArrayList value

setCargo

public final void setCargo(java.util.ArrayList<GoodsType> cargo)
Set the cargo values.

Parameters:
cargo - and arraylist of cargo values.

addCargo

public void addCargo(GoodsType newCargo)

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