code: protected <T extends BasicInclude> List<T> aggregateBasicIncludes(List<T> original, AggregatorCallback<T> callback) throws IOException {
          final List<T> result = new LinkedList<T>();
          final Deque<T> currentAggregateList = new LinkedList<T>();
          for (final T originalElement : original) {
              // handle first loop iteration
              if (currentAggregateList.isEmpty()) {
                  currentAggregateList.add(originalElement);
              }
              else {
                  // test if 'originalElement' will aggregate with head element in currentAggregate 
                  final T baseElement = currentAggregateList.getFirst();
                  if (callback.willAggregate(originalElement, baseElement)) {
                      // matches current criteria, add to currentAggregate
                      currentAggregateList.add(originalElement);
                  } 
                  else {
                      // doesn't match criteria
                      // generate new single aggregate from currentAggregateList
                      final T aggregate = callback.aggregate(currentAggregateList);
                      if (null != aggregate) {
                          // push result
                          result.add(aggregate);
                      }
                      else {
                          this.logger.warn("Generated 0 byte aggregate from: " + generatePathList(currentAggregateList));
                      }
  
                      // zero out currentAggregateList
                      currentAggregateList.clear();
  
                      // add originalElement to empty list
                      currentAggregateList.add(originalElement);
                  }
              }
          }
          
          // flush the currentAggregateList
          if (currentAggregateList.size() > 0) {
              final T aggregate = callback.aggregate(currentAggregateList);
              if (null != aggregate) {
                  result.add(aggregate);
              }
              else {
                  this.logger.warn("Generated 0 byte aggregate from: " + generatePathList(currentAggregateList));
              }
          }
          
          return result;
  	}
docs: Iterate over the list of {@link BasicInclude} sub-classes using the {@link AggregatorCallback#willAggregate(BasicInclude, BasicInclude)}
  and {@link AggregatorCallback#aggregate(Deque)} to generate an aggregated list of {@link BasicInclude} sub-classes.