class DataAggregator {

	public ReportLine append(ReportLine row) {
		synchronized (this) {
			String usageInterval = truncDate(row.getUsageDate());
			row.setUsageDate(usageInterval);
			int index = Collections.binarySearch(reportLines, row, aggComparator);
			if (index < 0) {
				index = -index;
				if (index > reportLines.size()) {
					reportLines.add(row);
				} else {
					reportLines.add(index - 1, row);
				}
			} else {
				ReportLine found = reportLines.get(index);
				found.setUsage(found.getUsage() + row.getUsage());
				found.setCost(found.getCost() + row.getCost());
				return found;
			}
		}

		return row;
	}

	public  DataAggregator(AggregateGranularity granularity);

}