protected void computeColumnTotal(BucketMap bucketMap) throws JRException { MeasureValue[] totals = initMeasureValues(); for (Iterator it = bucketMap.entryIterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); for (int i = bucketMap.level + 1; i < allBuckets.length; ++i) { entry = ((BucketMap) entry.getValue()).getTotalEntry(); } sumVals(totals, (MeasureValue[]) entry.getValue()); } for (int i = bucketMap.level + 1; i < allBuckets.length; ++i) { bucketMap = bucketMap.addTotalNextMap(); } bucketMap.addTotalEntry(totals); }
protected void computeRowTotals(BucketMap bucketMap) throws JRException { BucketListMap totals = createCollectBucketMap(rowBucketCount); for (Iterator it = bucketMap.entryIterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); for (int i = bucketMap.level + 1; i < rowBucketCount; ++i) { entry = ((BucketMap) entry.getValue()).getTotalEntry(); } totals.collectVals((BucketMap) entry.getValue(), true); } BucketMap totalBucketMap = bucketMap; for (int i = bucketMap.level + 1; i < rowBucketCount; ++i) { totalBucketMap = totalBucketMap.addTotalNextMap(); } totalBucketMap.addTotalEntry(totals); }
protected void computeRowTotals(BucketMap bucketMap) throws JRException { BucketMapMap totals = createRowTotalsBucketMap(); for (Iterator<Map.Entry<Bucket, Object>> it = bucketMap.entryIterator(); it.hasNext(); ) { Map.Entry<Bucket, Object> entry = it.next(); for (int i = bucketMap.level + 1; i < rowBucketCount; ++i) { entry = ((BucketMap) entry.getValue()).getTotalEntry(); } totals.sumValues((BucketMap) entry.getValue()); } BucketMap totalBucketMap = bucketMap; for (int i = bucketMap.level + 1; i < rowBucketCount; ++i) { totalBucketMap = totalBucketMap.addTotalNextMap(); } totalBucketMap.addTotalEntry(totals); }