コード例 #1
0
 private String getAllProblems() {
   StringBuilder builder = new StringBuilder();
   for (Problem problem : problems) {
     if (builder.length() > 0) {
       builder.append(", ");
     }
     builder.append(problem.getLine());
     builder.append('.');
     builder.append(problem.getCharacter());
     builder.append(':');
     builder.append(problem.getMessage());
   }
   return builder.toString();
 }
コード例 #2
0
 private String getPositionFromProblem(int n) {
   Problem problem = problems.get(n);
   return problem.getLine() + "." + problem.getCharacter();
 }