code: public TileSet getTileSetByGID(int gid) {
  		for (int i = 0; i < tileSets.size(); i++) {
  			TileSet set = (TileSet) tileSets.get(i);
  
  			if (set.contains(gid)) {
  				return set;
  			}
  		}
  
  		return null;
  	}
docs: Get a tileset by a given global ID
  
  @param gid
  The global ID of the tileset to retrieve
  @return The tileset requested or null if no tileset matches