com.badlogic.gdx.maps
Class MapLayers

java.lang.Object
  extended by com.badlogic.gdx.maps.MapLayers
All Implemented Interfaces:
Iterable<MapLayer>

public class MapLayers
extends Object
implements Iterable<MapLayer>

Ordered list of MapLayer instances owned by a Map


Constructor Summary
MapLayers()
           
 
Method Summary
 void add(MapLayer layer)
           
 MapLayer get(int index)
           
 MapLayer get(String name)
           
<T extends MapLayer>
Array<T>
getByType(Class<T> type)
           
<T extends MapLayer>
Array<T>
getByType(Class<T> type, Array<T> fill)
           
 int getCount()
           
 Iterator<MapLayer> iterator()
           
 void remove(int index)
           
 void remove(MapLayer layer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapLayers

public MapLayers()
Method Detail

get

public MapLayer get(int index)
Parameters:
index -
Returns:
layer at index

get

public MapLayer get(String name)
Parameters:
name -
Returns:
first layer matching the name, null otherwise

getCount

public int getCount()
Returns:
number of layers in the collection

add

public void add(MapLayer layer)
Parameters:
layer - layer to be added to the set

remove

public void remove(int index)
Parameters:
index - removes layer at index

remove

public void remove(MapLayer layer)
Parameters:
layer - layer to be removed

getByType

public <T extends MapLayer> Array<T> getByType(Class<T> type)
Parameters:
type -
Returns:
array with all the layers matching type

getByType

public <T extends MapLayer> Array<T> getByType(Class<T> type,
                                               Array<T> fill)
Parameters:
type -
fill - array to be filled with the matching layers
Returns:
array with all the layers matching type

iterator

public Iterator<MapLayer> iterator()
Specified by:
iterator in interface Iterable<MapLayer>
Returns:
iterator to set of layers


Copyright © 2013. All Rights Reserved.