Package net.sf.freecol.common.model
Interface Locatable
-
- All Known Implementing Classes:
Goods
,LostCityRumour
,Resource
,ServerUnit
,TileImprovement
,TileItem
,Unit
public interface Locatable
An object that can be put in aLocation
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Location
getLocation()
Gets the location of thisLocatable
.int
getSpaceTaken()
Gets the number of cargo slots consumed when thisLocatable
if put onto a carrier.Tile
getTile()
Get theTile
where thisLocatable
is located, ornull
if it is inEurope
.boolean
isInEurope()
Is this locatable in Europe.boolean
setLocation(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 newLocation
for theLocatable
.- Returns:
- True if the location change succeeds.
-
isInEurope
boolean isInEurope()
Is this locatable in Europe.- Returns:
- True if the
Locatable
is inEurope
.
-
getTile
Tile getTile()
Get theTile
where thisLocatable
is located, ornull
if it is inEurope
.- Returns:
- The
Tile
where thisLocatable
is located, if any.
-
getSpaceTaken
int getSpaceTaken()
Gets the number of cargo slots consumed when thisLocatable
if put onto a carrier.- Returns:
- The number of cargo slots required.
-
-