Entity class
An entity is a uniquely identifiable object that serves as a container or identifier for components in a Dependency Injection (DI) or Entity-Component-System (ECS) framework.
Constructors
- Entity.new(int id)
-
Creates a new instance of Entity identified by
id
. Theid
must be 0 or greater.const - Entity.obj(Object object)
-
Creates a new instance of Entity from the specified
object
. This effectively uses objId to convert theobject
to an int and then uses that as the id for the new Entity instance.factory - Entity.reserved(int id)
-
Creates a new Entity with the given
id
. Theid
must be less than 0.const
Properties
Methods
-
isDefault(
) → bool -
isNotDefault(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preferOverDefault(
Entity other) → Entity -
Returns
other
ifthis
is DefaultEntity, otherwise returnsthis
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override