@Override
	protected AggregateCountsResource instantiateResource(AggregateCount entity) {
		AggregateCountsResource result = new AggregateCountsResource(entity.getName());
		ReadablePeriod increment = entity.getResolution().unitPeriod;
		DateTime end = entity.getInterval().getEnd();
		int i = 0;
		for (DateTime when = entity.getInterval().getStart(); !when.isAfter(end); when = when.plus(increment)) {
			result.addValue(new Date(when.getMillis()), entity.getCounts()[i++]);
		}
		return result;
	}
Knows how to construct {@link AggregateCountsResource} out of {@link AggregateCount}.

@author Eric Bottard
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/metrics/DeepAggregateCountResourceAssembler.java