add method

void add(
  1. int entity,
  2. String group
)

Set the group of the entity.

Implementation

void add(int entity, String group) {
  _entitiesByGroup.putIfAbsent(group, Bag<int>.new).add(entity);
  _groupsByEntity.putIfAbsent(entity, Bag<String>.new).add(group);
}