class ManagerComponentImpl implements ManagerComponent {

    private final Map<Class<?>, Manager<?>> managersByEntity;

    public ManagerComponentImpl() {
        managersByEntity = new ConcurrentHashMap<>();
    }

    @Override
    public <ENTITY> void put(Manager<ENTITY> manager) {
        requireNonNull(manager);
        managersByEntity.put(manager.getEntityClass(), manager);
    }

    @Override
    @SuppressWarnings("unchecked")
    public <E> Manager<E> managerOf(Class<E> entityClass) {<FILL_FUNCTION_BODY>}

    @Override
    public Stream<Manager<?>> stream() {
        return managersByEntity.values().stream();
    }
}

        
        requireNonNull(entityClass);
        
        @SuppressWarnings("unchecked")
        final Manager<E> manager = (Manager<E>) 
            managersByEntity.get(entityClass);
        
        if (manager == null) {
            throw new SpeedmentException(
                "No manager exists for " + entityClass
            );
        }
        
        return manager;
    
<no_super_class>