Package net.sf.freecol.common.model
Interface Locatable
-
- All Known Implementing Classes:
Goods,LostCityRumour,Resource,ServerUnit,TileImprovement,TileItem,Unit
public interface LocatableAn object that can be put in aLocation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LocationgetLocation()Gets the location of thisLocatable.intgetSpaceTaken()Gets the number of cargo slots consumed when thisLocatableif put onto a carrier.TilegetTile()Get theTilewhere thisLocatableis located, ornullif it is inEurope.booleanisInEurope()Is this locatable in Europe.booleansetLocation(Location newLocation)Sets the location for thisLocatable.
-
-
-
Method Detail
-
getLocation
Location getLocation()
Gets the location of thisLocatable.- Returns:
- The location of this
Locatable.
-
setLocation
boolean setLocation(Location newLocation)
Sets the location for thisLocatable.- Parameters:
newLocation- The newLocationfor theLocatable.- Returns:
- True if the location change succeeds.
-
isInEurope
boolean isInEurope()
Is this locatable in Europe.- Returns:
- True if the
Locatableis inEurope.
-
getTile
Tile getTile()
Get theTilewhere thisLocatableis located, ornullif it is inEurope.- Returns:
- The
Tilewhere thisLocatableis located, if any.
-
getSpaceTaken
int getSpaceTaken()
Gets the number of cargo slots consumed when thisLocatableif put onto a carrier.- Returns:
- The number of cargo slots required.
-
-