APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.maps.tiled

public Class TiledMapTileSet

extends Object
implements Iterable<TiledMapTile>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
java.util.Iterator, com.badlogic.gdx.maps.MapProperties, com.badlogic.gdx.utils.IntMap

@brief Set of TiledMapTile instances used to compose a TiledMapLayer

Field Summary

Modifier and TypeField and Description
private String
private MapProperties
private IntMap<TiledMapTile>

Constructor Summary

AccessConstructor and Description
public
TiledMapTileSet()

Creates empty tileset

Method Summary

Modifier and TypeMethod and Description
public String
getName()

Returns: tileset's name

public MapProperties
getProperties()

Returns: tileset's properties set

public TiledMapTile

Returns:

tile matching id, null if it doesn't exist
getTile
(int
the id of the TiledMapTile to retrieve.
id
)

Gets the TiledMapTile that has the given id.

public Iterator<TiledMapTile>

Returns:

iterator to tiles in this tileset
iterator
()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public void
putTile(int
the id of the TiledMapTile to add or replace.
id
,
TiledMapTile
the TiledMapTile to add or replace.
tile
)

Adds or replaces tile with that id

public void
removeTile(int
tile's id to be removed
id
)

public void
setName(String
new name for the tileset
name
)

public int
size()

Returns: the size of this TiledMapTileSet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
private String name
propertiesback to summary
private MapProperties properties
tilesback to summary
private IntMap<TiledMapTile> tiles

Constructor Detail

TiledMapTileSetback to summary
public TiledMapTileSet()

Creates empty tileset

Method Detail

getNameback to summary
public String getName()
Returns:String

tileset's name

getPropertiesback to summary
public MapProperties getProperties()
Returns:MapProperties

tileset's properties set

getTileback to summary
public TiledMapTile getTile(int id)

Gets the TiledMapTile that has the given id.

Parameters
id:int

the id of the TiledMapTile to retrieve.

Returns:TiledMapTile

tile matching id, null if it doesn't exist

iteratorback to summary
public Iterator<TiledMapTile> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<TiledMapTile>

iterator to tiles in this tileset

Annotations
@Override
putTileback to summary
public void putTile(int id, TiledMapTile tile)

Adds or replaces tile with that id

Parameters
id:int

the id of the TiledMapTile to add or replace.

tile:TiledMapTile

the TiledMapTile to add or replace.

removeTileback to summary
public void removeTile(int id)
Parameters
id:int

tile's id to be removed

setNameback to summary
public void setName(String name)
Parameters
name:String

new name for the tileset

sizeback to summary
public int size()
Returns:int

the size of this TiledMapTileSet.