class ClassPathResult {

  public String formatDependencyPaths(Iterable<ClassPathEntry> entries) {
    StringBuilder message = new StringBuilder();
    for (ClassPathEntry entry : entries) {
      ImmutableList<DependencyPath> dependencyPaths = getDependencyPaths(entry);
      checkArgument(dependencyPaths.size() >= 1, "%s is not in the class path", entry);

      message.append(entry + " is at:\n");

      int otherCount = dependencyPaths.size() - 1;
      message.append("  " + dependencyPaths.get(0) + "\n");
      if (otherCount == 1) {
        message.append("  and 1 dependency path.\n");
      } else if (otherCount > 1) {
        message.append("  and " + otherCount + " other dependency paths.\n");
      }
    }
    return message.toString();
  }

  public  ClassPathResult(
      ListMultimap<ClassPathEntry, DependencyPath> dependencyPaths,
      Iterable<UnresolvableArtifactProblem> artifactProblems);

}