|
||||||||||
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 | |
---|---|
void |
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 or null if this Location does not belong to a colony. |
GoodsContainer |
getGoodsContainer()
Gets the GoodsContainer this Location use
for storing it's goods. |
java.lang.String |
getId()
Gets the ID of this Location . |
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. |
void |
remove(Locatable locatable)
Removes a Locatable from this Location. |
Method Detail |
---|
Tile getTile()
void add(Locatable locatable)
Locatable
to this Location.
locatable
- The Locatable
to add to this Location.void 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.Colony getColony()
Colony
this Location
is
located in or null if this Location does not belong to a colony.
Colony
or null if not in a colony.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |