Class ConvoyList
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.ship.ConvoyList
-
-
Constructor Summary
Constructors Constructor Description ConvoyList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(IConvoy iConvoy)java.util.List<IConvoy>findConvoy(ICity city)Find all convois in town.IConvoyfindConvoyOfOrleg(IShip orleg)Find the convoy of anorlegship.java.util.Iterator<IConvoy>iterator()booleanremove(java.lang.Object o)
-
-
-
Method Detail
-
add
public boolean add(IConvoy iConvoy)
-
remove
public boolean remove(java.lang.Object o)
-
findConvoy
public java.util.List<IConvoy> findConvoy(ICity city)
Find all convois in town.- Parameters:
city- for which to find convoys- Returns:
- list ov convoys in the city.
-
findConvoyOfOrleg
public IConvoy findConvoyOfOrleg(IShip orleg)
Find the convoy of anorlegship.- Parameters:
orleg- of the convoy that is looked up.- Returns:
- convoy
- Throws:
java.lang.IllegalArgumentException- when theorlegis not an orleg ship of any convoy.
-
-