Skip to content

What is an Entity?

Elliot Ford edited this page May 25, 2015 · 12 revisions

Overview

An Entity represents an agent within the system. Entities are AttributeContainers and EntityContainers - this means they can have both attributes and child entities (tree structure).

What is an Entity type?

An entity type is a subclass of Entity that conforms to the what is defined in Creating an Entity type. The type system allows for the dynamic entities to be used as specific types with defined methods. Entities can also be marked as multiple types that can be added/removed at run-time - which can be used for filtering.

What is an EntityTypeListener?

When entities are marked or unmarked as different types an EntityTypeEvent is created and handed out to all EntityTypeListeners for that Entity.

What is an EntityContainer?

An EntityContainer is an Entity store that can also create and transfer entities. There is a default implementation available: DefaultEntityContainer.

What is an EntityListener?

When entities are created, transfered or killed an EntityEvent is created and handed out to all EntityListeners for that container.

What is an EntityFactory?

Each EntityContainer is backed by an EntityFactory which provides controls the addition or removal of entities from the entity tree. There may only be one factory instance per tree - by default JALSE uses DefaultEntityFactory and it creates DefaultEntity instances (see What is an EntityFactory for more information).

Useful utility methods

For some handy Entity related methods see Entities (API docs for Entities):

Clone this wiki locally