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

    accumulatedSize = sum;
    return sum;
  }
예제 #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;
  }