Esempio n. 1
0
  public long calculateAccumulatedSize() {
    long sum = size;
    for (CategoryStatistics cs : children) {
      sum += cs.calculateAccumulatedSize();
    }

    accumulatedSize = sum;
    return sum;
  }
Esempio n. 2
0
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    CategoryStatistics that = (CategoryStatistics) o;

    if (!categoryKey.equals(that.getCategoryKey())) {
      return false;
    }

    return true;
  }