class ValuePathEvaluator {

  public static List<Result<?>> evaluate(String valuePath, ReportCalculationResults results) {
    List<String> tokens = tokenize(valuePath);

    if (tokens.size() < 1) {
      return Collections.nCopies(
          results.getTargets().size(),
          Result.failure(FailureReason.INVALID, "Column expressions must not be empty"));
    }
    CalculationFunctions functions = results.getCalculationFunctions();
    int rowCount = results.getCalculationResults().getRowCount();
    return IntStream.range(0, rowCount)
        .mapToObj(rowIndex -> evaluate(functions, tokens, RootEvaluator.INSTANCE, new ResultsRow(results, rowIndex)))
        .collect(toImmutableList());
  }

  private  ValuePathEvaluator();

}