|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Location
A place where a Locatable can be put.
Locatable| Method Summary | |
|---|---|
boolean |
add(Locatable locatable)
Adds a Locatable to this Location. |
boolean |
canAdd(Locatable locatable)
Checks whether or not the specified locatable may be added to this Location. |
boolean |
contains(Locatable locatable)
Checks if this Location contains the specified
Locatable. |
Colony |
getColony()
Returns the Colony this Location is
located in. |
GoodsContainer |
getGoodsContainer()
Gets the GoodsContainer this Location use
for storing it's goods. |
java.lang.String |
getId()
Gets the ID of this Location. |
StringTemplate |
getLocationName()
Returns the name of this location. |
StringTemplate |
getLocationNameFor(Player player)
Returns the name of this location for a particular player. |
Settlement |
getSettlement()
Returns the Settlement this Location is
located in. |
Tile |
getTile()
Returns the Tile where this Location is located. |
int |
getUnitCount()
Returns the amount of Units at this Location. |
java.util.Iterator<Unit> |
getUnitIterator()
Gets a Iterator of every Unit directly
located on this Location. |
java.util.List<Unit> |
getUnitList()
Returns a list containing all the Units present at this Location. |
boolean |
remove(Locatable locatable)
Removes a Locatable from this Location. |
| Method Detail |
|---|
Tile getTile()
StringTemplate getLocationName()
StringTemplate getLocationNameFor(Player player)
player - The Player to return the name for.
boolean add(Locatable locatable)
Locatable to this Location.
locatable - The Locatable to add to this Location.boolean remove(Locatable locatable)
Locatable from this Location.
locatable - The Locatable to remove from this Location.boolean contains(Locatable locatable)
Location contains the specified
Locatable.
locatable - The Locatable to test the presence of.
Locatable is
on this Location and
boolean canAdd(Locatable locatable)
Location.
locatable - The Locatable to add.
int getUnitCount()
java.util.List<Unit> getUnitList()
java.util.Iterator<Unit> getUnitIterator()
Iterator of every Unit directly
located on this Location.
Iterator.java.lang.String getId()
Location.
FreeColObject.getId()GoodsContainer getGoodsContainer()
GoodsContainer this Location use
for storing it's goods.
GoodsContainer or null if the
Location cannot store any goods.Settlement getSettlement()
Settlement this Location is
located in.
Settlement or null if none.Colony getColony()
Colony this Location is
located in.
Colony or null if none.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||