コード例 #1
0
 @Override
 public boolean evaluate(Work w) {
   String line = null;
   long mySum = 0;
   for (; ; ) {
     try {
       line = Parfio.readLine();
     } catch (Exception ex) {
     }
     if (line == null) break;
     mySum += Integer.parseInt(line);
   }
   synchronized (this) {
     sum += mySum;
   }
   return true;
 }