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

public Class TiledMapTileSets

extends Object
implements Iterable<TiledMapTileSet>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
java.util.Iterator, com.badlogic.gdx.utils.Array

@brief Collection of TiledMapTileSet

Field Summary

Modifier and TypeField and Description
private Array<TiledMapTileSet>

Constructor Summary

AccessConstructor and Description
public
TiledMapTileSets()

Creates an empty collection of tilesets.

Method Summary

Modifier and TypeMethod and Description
public void
addTileSet(TiledMapTileSet
set to be added to the collection
tileset
)

public TiledMapTile
getTile(int
id of the TiledMapTile to get.
id
)

Returns: tile with matching id, null if it doesn't exist

public TiledMapTileSet
getTileSet(int
index to get the desired TiledMapTileSet at.
index
)

Returns: tileset at index

public TiledMapTileSet
getTileSet(String
Name of the TiledMapTileSet to retrieve.
name
)

Returns: tileset with matching name, null if it doesn't exist

public Iterator<TiledMapTileSet>

Returns:

iterator to tilesets
iterator
()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public void
removeTileSet(int
index at which to remove a tileset.
index
)

Removes tileset at index

public void
removeTileSet(TiledMapTileSet
set to be removed
tileset
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tilesetsback to summary
private Array<TiledMapTileSet> tilesets

Constructor Detail

TiledMapTileSetsback to summary
public TiledMapTileSets()

Creates an empty collection of tilesets.

Method Detail

addTileSetback to summary
public void addTileSet(TiledMapTileSet tileset)
Parameters
tileset:TiledMapTileSet

set to be added to the collection

getTileback to summary
public TiledMapTile getTile(int id)
Parameters
id:int

id of the TiledMapTile to get.

Returns:TiledMapTile

tile with matching id, null if it doesn't exist

getTileSetback to summary
public TiledMapTileSet getTileSet(int index)
Parameters
index:int

index to get the desired TiledMapTileSet at.

Returns:TiledMapTileSet

tileset at index

getTileSetback to summary
public TiledMapTileSet getTileSet(String name)
Parameters
name:String

Name of the TiledMapTileSet to retrieve.

Returns:TiledMapTileSet

tileset with matching name, null if it doesn't exist

iteratorback to summary
public Iterator<TiledMapTileSet> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<TiledMapTileSet>

iterator to tilesets

Annotations
@Override
removeTileSetback to summary
public void removeTileSet(int index)

Removes tileset at index

Parameters
index:int

index at which to remove a tileset.

removeTileSetback to summary
public void removeTileSet(TiledMapTileSet tileset)
Parameters
tileset:TiledMapTileSet

set to be removed