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 boolean
add(IConvoy iConvoy)
java.util.List<IConvoy>
findConvoy(ICity city)
Find all convois in town.IConvoy
findConvoyOfOrleg(IShip orleg)
Find the convoy of anorleg
ship.java.util.Iterator<IConvoy>
iterator()
boolean
remove(java.lang.Object o)
-
-
-
Field Detail
-
convois
private java.util.List<IConvoy> convois
-
-
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 anorleg
ship.- Parameters:
orleg
- of the convoy that is looked up.- Returns:
- convoy
- Throws:
java.lang.IllegalArgumentException
- when theorleg
is not an orleg ship of any convoy.
-
-