コード例 #1
0
 /**
  * Updates all league tables with a match. Expects to be called with matches in chronological
  * order (earliest first) and only updates before the games on the next day.
  */
 public void updateWithMatch(Match match) {
   Calendar calendar = Calendar.getInstance();
   calendar.setTime(match.getDate());
   int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
   if (dayOfYear != lastSeenDay) {
     lastSeenDay = dayOfYear;
     for (LeagueTable lTable : tables.values()) {
       lTable.updateLeague(matchBuffer);
     }
     matchBuffer.clear();
   }
   matchBuffer.add(match);
 }