protected void addComponent(Entity e, Component component)
    {
        ComponentType type = ComponentTypeManager.getTypeFor(component.getClass());
        
        if (type.getId() >= componentsByType.getCapacity())
        {
            componentsByType.set(type.getId(), null);
        }
        
        Bag<Component> components = componentsByType.get(type.getId());
        
        if (components == null)
        {
            components = new Bag<Component>();
            componentsByType.set(type.getId(), components);
        }
        
        components.set(e.getId(), component);
        
        e.addTypeBit(type.getBit());
    }