Package games.stendhal.common.tiled
Class TileSetDefinition
java.lang.Object
games.stendhal.common.tiled.TileSetDefinition
- All Implemented Interfaces:
Serializable
Stores a definition of a tileset. Mainly its name, the source image used and
the starting global id.
- Author:
- miguel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
encode()
boolean
int
Returns the id where this tileset begins to number tiles.Returns the filename of the source image of the tileset.int
hashCode()
void
Method to build the object from a stream of bytesvoid
Set the filename of the source image of the tileset.void
writeObject(OutputSerializer out)
Method to convert the object into a stream
-
Constructor Details
-
TileSetDefinition
Constructor.- Parameters:
name
- the *useless* name of the tileset.source
- the image filenamefirstGid
- the id where this tileset begins to number tiles.
-
-
Method Details
-
getFirstGid
public int getFirstGid()Returns the id where this tileset begins to number tiles.- Returns:
- the id where this tileset begins to number tiles
-
setSource
Set the filename of the source image of the tileset.- Parameters:
attributeValue
- the filename
-
getSource
Returns the filename of the source image of the tileset.- Returns:
- the filename of the source image of the tileset.
-
encode
- Throws:
IOException
-
readObject
Description copied from interface:Serializable
Method to build the object from a stream of bytes- Specified by:
readObject
in interfaceSerializable
- Parameters:
in
- InputSerializer to read from- Throws:
IOException
- in case of an IO-error
-
writeObject
Description copied from interface:Serializable
Method to convert the object into a stream- Specified by:
writeObject
in interfaceSerializable
- Parameters:
out
- OutputSerializer to write the object to- Throws:
IOException
- in case of an IO-error
-
equals
-
hashCode
public int hashCode()
-