示例#1
0
文件: Day.java 项目: Giren/SmartMeter
  public MinMeanMax getMmm() {
    int mean = 0;
    int max = 0;
    int totalSum = 0;

    int temp = 0;

    for (Hour h : hours) {
      // TODO: Handle Min

      if ((temp = h.getMmm().getMax()) > max) max = temp;

      mean += h.getMmm().getMean();

      if ((temp = h.getMmm().getTotalSum()) > totalSum) totalSum = temp;
    }

    mean /= hours.size();

    return new MinMeanMax(totalSum, 0, mean, max);
  }