| Constructor and Description |
|---|
MapObjects()
Creates and empty set of MapObject instances
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(MapObject object) |
MapObject |
get(int index) |
MapObject |
get(java.lang.String name) |
<T extends MapObject> |
getByType(java.lang.Class<T> type) |
<T extends MapObject> |
getByType(java.lang.Class<T> type,
Array<T> fill) |
int |
getCount() |
java.util.Iterator<MapObject> |
iterator() |
void |
remove(int index) |
void |
remove(MapObject object) |
public MapObject get(int index)
index - public MapObject get(java.lang.String name)
name - public void add(MapObject object)
object - instance to be added to the collectionpublic void remove(int index)
index - removes MapObject instance at indexpublic void remove(MapObject object)
object - instance to be removedpublic int getCount()
public <T extends MapObject> Array<T> getByType(java.lang.Class<T> type)
type - class of the objects we want to retrievepublic <T extends MapObject> Array<T> getByType(java.lang.Class<T> type, Array<T> fill)
type - class of the objects we want to retrievefill - collection to put the returned objects in