package p.studio.registry.models;

import java.nio.file.Path;
import java.util.Map;
import java.util.Optional;

public class Registry {
    private final Map<ProjectRef, Path> pathByDependency;

    public Registry(final Map<ProjectRef, Path> pathByDependency) {
        this.pathByDependency = pathByDependency;
    }

    public Optional<Path> optional(final ProjectRef projectRef) {
        return Optional.ofNullable(pathByDependency.get(projectRef));
    }
}
