|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.artemis.ComponentMapper<A>
A - the class type of the componentpublic class ComponentMapper<A extends Component>
High performance component retrieval from entities. Use this wherever you need to retrieve components from entities often and fast.
| Method Summary | ||
|---|---|---|
A |
get(Entity e)
Fast but unsafe retrieval of a component for this entity. |
|
static
|
getFor(java.lang.Class<T> type,
World world)
Returns a component mapper for this type of components. |
|
A |
getSafe(Entity e)
Fast and safe retrieval of a component for this entity. |
|
boolean |
has(Entity e)
Checks if the entity has this type of component. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public A get(Entity e)
e - the entity that should possess the component
public A getSafe(Entity e)
e - the entity that should possess the component
public boolean has(Entity e)
e - the entity to check
public static <T extends Component> ComponentMapper<T> getFor(java.lang.Class<T> type,
World world)
type - the type of components this mapper uses.world - the world that this component mapper should use.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||