public <T extends Component> void addComponent(UUID entity, T component) {
        if (frozen) {
            return;
        }

        synchronized (componentStores) {
            HashMap<UUID, ? extends Component> store = componentStores
                    .get(component.getClass());

            if (store == null) {
                store = new HashMap<>();
                componentStores.put(component.getClass(), store);
            }

            ((HashMap<UUID, T>) store).put(entity, component);
        }
    }