public void set (String group, Entity e)
    {
        remove(e);
        
        Bag<Entity> entities = entitiesByGroup.get(group);
        
        if (entities == null)
        {
            entities = new Bag<Entity>();
            entitiesByGroup.put(group, entities);
        }
        
        entities.add(e);
        
        groupByEntity.set(e.getId(), group);
    }