class ProjectRoot {

    private final Path root;

    private final Map<Path, SourceRoot> cache = new ConcurrentHashMap<>();

    private final ParserConfiguration parserConfiguration;

    public ProjectRoot(Path root) {
        this(root, new ParserConfiguration());
    }

    public ProjectRoot(Path root, ParserConfiguration parserConfiguration) {
        this.root = root;
        this.parserConfiguration = parserConfiguration;
    }

    public Optional<SourceRoot> getSourceRoot(Path sourceRoot) {
        return Optional.ofNullable(cache.get(sourceRoot));
    }

    public List<SourceRoot> getSourceRoots() {
        return new ArrayList<>(cache.values());
    }

    public void addSourceRoot(Path path) {
        cache.put(path, new SourceRoot(path).setParserConfiguration(parserConfiguration));
    }

    public Path getRoot() {
        return root;
    }

    @Override
    public String toString() {<FILL_FUNCTION_BODY>}
}

        return "ProjectRoot at " + root + " with " + cache.values().toString();
    
<no_super_class>