# EntityClass

constructor(table: IdTable<ID>, entityType: Class<T>? = null, entityCtor: (EntityID<ID>) -> T? = null)

#### Parameters

table

The IdTable object that stores rows mapped to entities managed by this class.

entityType

The expected Entity class type. This can be left `null` if it is the class of type argument T provided to this EntityClass instance.

entityCtor

The function invoked to instantiate an Entity using a provided EntityID value. If a reference to a specific entity constructor or a custom function is not passed as an argument, reflection will be used to determine the primary constructor of the associated entity class on first access (which can be slower).