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.List<GoodsType> cargo
           
private  Location location
           
private  boolean modified
          Whether the stop has been modified.
 
Constructor Summary
TradeRoute.Stop(Location location)
           
TradeRoute.Stop(TradeRoute.Stop other)
          Copy constructor.
 
Method Summary
 void addCargo(GoodsType newCargo)
           
 java.util.List<GoodsType> getCargo()
          Get the Cargo value.
 Location getLocation()
          Get the Location value.
 boolean isModified()
          Get the Modified value.
 boolean isValid()
          Is this stop valid?
 void setCargo(java.util.List<GoodsType> cargo)
          Set the cargo values.
 void setModified(boolean newModified)
          Set the Modified value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

location

private Location location

cargo

private java.util.List<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

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

Parameters:
other -
Method Detail

isValid

public boolean isValid()
Is this stop valid?

Returns:
True if the stop is valid.

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.List<GoodsType> getCargo()
Get the Cargo value.

Returns:
a cloned ArrayList value

setCargo

public final void setCargo(java.util.List<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