| Constructor and Description |
|---|
UUIDEntity()
Constructs an
UUIDEntity with a random UUID |
UUIDEntity(UUID uuid)
Constructs an
UUIDEntity with the specified UUID |
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(Component component)
|
void |
addEntityListener(EntityListener listener)
Adds an
EntityListener to this UUIDEntity |
<T> List<T> |
getComponents(Class<T> clazz)
Returns all
Components that implement the specified the class or interface |
UUID |
getUUID()
Returns the
UUID for this UUIDEntity |
<T extends Component> |
removeAllComponentsOfType(Class<T> clazz)
Removes all
Components that implement a specific type |
void |
removeComponent(Component component)
Removes the specified
Component from this UUIDEntity |
void |
removeEntityListener(EntityListener listener)
Removes an
EntityListener from this UUIDEntity |
public UUIDEntity()
UUIDEntity with a random UUIDpublic UUIDEntity(UUID uuid)
UUIDEntity with the specified UUIDuuid - The UUID to associate with this UUIDEntitypublic void addComponent(Component component)
addComponent in interface Entitycomponent - An instance of Componentpublic <T> List<T> getComponents(Class<T> clazz)
Components that implement the specified the class or interfacegetComponents in interface Entityclazz - The Class to search forList if no such Components are attached to this UUIDEntitypublic void removeComponent(Component component)
Component from this UUIDEntityremoveComponent in interface Entitycomponent - The Component to removepublic <T extends Component> List<T> removeAllComponentsOfType(Class<T> clazz)
Components that implement a specific typeremoveAllComponentsOfType in interface Entityclazz - The Class to search forpublic void addEntityListener(EntityListener listener)
EntityListener to this UUIDEntityaddEntityListener in interface Entitylistener - The EntityListener to addpublic void removeEntityListener(EntityListener listener)
EntityListener from this UUIDEntityremoveEntityListener in interface Entitylistener - The EntityListener to be removedpublic UUID getUUID()
UUID for this UUIDEntityCopyright © 2014. All rights reserved.