Class Tile
java.lang.Object
de.hamstersimulator.objectsfirst.internal.model.territory.Tile
- All Implemented Interfaces:
ObservableTile
-
Property Summary
TypePropertyDescriptionGetter for the content property Provides a read-only list of all contents on this tileGetter for the grainCount property Always greater than or equal to 0 the content property contains as much ObservableGrains as the value of this propertyGetter for the hamsters property Provides a read-only list of all hamsters on this tile, therefore this is a sublist of content -
Method Summary
Modifier and TypeMethodDescriptionGetter for the content property Provides a read-only list of all contents on this tilevoid
dispose()
Returns an unmodifiable list with all contents on this tileint
Returns the amount of grain on this tile.List<? extends TileContent>
Gets the value of the property hamsters.the location of this tile on the territoryGetter for the grainCount property Always greater than or equal to 0 the content property contains as much ObservableGrains as the value of this propertyGetter for the hamsters property Provides a read-only list of all hamsters on this tile, therefore this is a sublist of contentboolean
Returns true if this tile is blocked.Getter for the isBlocked property e.g.toString()
-
Property Details
-
grainCount
Getter for the grainCount property Always greater than or equal to 0 the content property contains as much ObservableGrains as the value of this property- Specified by:
grainCountProperty
in interfaceObservableTile
- See Also:
getGrainCount()
-
content
Getter for the content property Provides a read-only list of all contents on this tile- Specified by:
contentProperty
in interfaceObservableTile
- See Also:
getContent()
-
hamsters
Getter for the hamsters property Provides a read-only list of all hamsters on this tile, therefore this is a sublist of content- Specified by:
hamstersProperty
in interfaceObservableTile
- See Also:
getHamsters()
-
-
Method Details
-
getTerritory
-
getLocation
the location of this tile on the territory- Specified by:
getLocation
in interfaceObservableTile
- Returns:
- the location (not null)
- See Also:
ObservableTerritory
-
getGrainCount
public int getGrainCount()Returns the amount of grain on this tile. This is always greater than or equal to 0.- Specified by:
getGrainCount
in interfaceObservableTile
- Returns:
- the amount of grains
-
isBlocked
public boolean isBlocked()Returns true if this tile is blocked. e.g. a tile is blocked if a wall is on it. A hamster cannot move on a blocked tile.- Specified by:
isBlocked
in interfaceObservableTile
- Returns:
- true if this tile is blocked
-
getContent
Returns an unmodifiable list with all contents on this tile- Specified by:
getContent
in interfaceObservableTile
- Returns:
- all contents on this tile (not null)
-
getHamsters
Gets the value of the property hamsters.- Property description:
- Getter for the hamsters property Provides a read-only list of all hamsters on this tile, therefore this is a sublist of content
-
grainCountProperty
Getter for the grainCount property Always greater than or equal to 0 the content property contains as much ObservableGrains as the value of this property- Specified by:
grainCountProperty
in interfaceObservableTile
- See Also:
getGrainCount()
-
isBlockedProperty
Getter for the isBlocked property e.g. a tile is blocked if a wall is on it- Specified by:
isBlockedProperty
in interfaceObservableTile
- Returns:
- the property (not null)
-
contentProperty
Getter for the content property Provides a read-only list of all contents on this tile- Specified by:
contentProperty
in interfaceObservableTile
- See Also:
getContent()
-
hamstersProperty
Getter for the hamsters property Provides a read-only list of all hamsters on this tile, therefore this is a sublist of content- Specified by:
hamstersProperty
in interfaceObservableTile
- See Also:
getHamsters()
-
dispose
public void dispose() -
toString
-