|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.model.FreeColGameObject
net.sf.freecol.common.model.TileItem
public abstract class TileItem
Represents a TileItem item on a Tile.
| Field Summary | |
|---|---|
static int |
RESOURCE_ZINDEX
|
static int |
RUMOUR_ZINDEX
|
protected Tile |
tile
|
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
UNITS_TAG_NAME |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
TileItem(Game game,
java.lang.String id)
Initiates a new TileItem
with the given ID. |
|
TileItem(Game game,
Tile tile)
Creates a new TileItem. |
|
TileItem(Game game,
javax.xml.stream.XMLStreamReader in)
Initiates a new TileItem from an XML stream. |
|
| Method Summary | |
|---|---|
Location |
getLocation()
Gets the location of this TileItem. |
int |
getSpaceTaken()
TileItems do not take any space, and cannot be taken carried. |
Tile |
getTile()
Returns the Tile where this TileItem is located,
or null if it's location is Europe. |
abstract int |
getZIndex()
Get the ZIndex value. |
abstract boolean |
isTileTypeAllowed(TileType tileType)
Returns true if the TileItem is compatible with the given . |
void |
setLocation(Location newLocation)
Sets the location for this TileItem. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObject |
|---|
dispose, disposeList, equals, equals, fundamentalDispose, getFreeColGameObject, getFreeColGameObject, getGame, getIntegerID, getSpecification, getXMLElementTagName, hashCode, isDisposed, isUninitialized, newLocation, readFromXML, readFromXMLPartialByClass, setDefaultId, setGame, setId, toString, toXML, toXMLImpl, toXMLImpl, toXMLPartialByClass, updateFreeColGameObject |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int RESOURCE_ZINDEX
public static final int RUMOUR_ZINDEX
protected Tile tile
| Constructor Detail |
|---|
public TileItem(Game game,
Tile tile)
TileItem.
game - The Game in which this object belong.tile - The location of the Settlement.
public TileItem(Game game,
javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
TileItem from an XML stream.
game - The Game in which this object belong.in - The input stream containing the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.
public TileItem(Game game,
java.lang.String id)
TileItem
with the given ID. The object should later be
initialized by calling either
FreeColGameObject.readFromXML(XMLStreamReader).
game - The Game in which this object belong.id - The unique identifier for this object.| Method Detail |
|---|
public void setLocation(Location newLocation)
TileItem.
setLocation in interface LocatablenewLocation - The new Location for the TileItem.public Location getLocation()
TileItem.
getLocation in interface LocatableTileItem.public Tile getTile()
Tile where this TileItem is located,
or null if it's location is Europe.
getTile in interface Locatablepublic int getSpaceTaken()
TileItems do not take any space, and cannot be taken carried.
getSpaceTaken in interface Locatablepublic abstract int getZIndex()
ZIndex value.
int valuepublic abstract boolean isTileTypeAllowed(TileType tileType)
tileType - a TileType value
boolean value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||