public long calculateAccumulatedSize() { long sum = size; for (CategoryStatistics cs : children) { sum += cs.calculateAccumulatedSize(); } accumulatedSize = sum; return sum; }
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; }