}
Cumulative.Filter[] filters = new Cumulative.Filter[]{Cumulative.Filter.TIME, Cumulative.Filter.NRJ};
if (addHeights) {
filters = ArrayUtils.append(filters, new Cumulative.Filter[]{Cumulative.Filter.HEIGHTS});
}
return new Cumulative(TASKS, HEIGHTS, CAPACITY, INCREMENTAL, filters);
}