Class TiledMapTileSets

  • All Implemented Interfaces:
    java.lang.Iterable<TiledMapTileSet>

    public class TiledMapTileSets
    extends java.lang.Object
    implements java.lang.Iterable<TiledMapTileSet>
    • Constructor Detail

      • TiledMapTileSets

        public TiledMapTileSets()
        Creates an empty collection of tilesets.
    • Method Detail

      • getTileSet

        public TiledMapTileSet getTileSet​(int index)
        Parameters:
        index - index to get the desired TiledMapTileSet at.
        Returns:
        tileset at index
      • getTileSet

        public TiledMapTileSet getTileSet​(java.lang.String name)
        Parameters:
        name - Name of the TiledMapTileSet to retrieve.
        Returns:
        tileset with matching name, null if it doesn't exist
      • addTileSet

        public void addTileSet​(TiledMapTileSet tileset)
        Parameters:
        tileset - set to be added to the collection
      • removeTileSet

        public void removeTileSet​(int index)
        Removes tileset at index
        Parameters:
        index - index at which to remove a tileset.
      • removeTileSet

        public void removeTileSet​(TiledMapTileSet tileset)
        Parameters:
        tileset - set to be removed
      • getTile

        public TiledMapTile getTile​(int id)
        Parameters:
        id - id of the TiledMapTile to get.
        Returns:
        tile with matching id, null if it doesn't exist
      • iterator

        public java.util.Iterator<TiledMapTileSet> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<TiledMapTileSet>
        Returns:
        iterator to tilesets