code: public void buildForExistingItems(final Collection<Item> output, final UUID targetInvoiceId) {
          // We start by pruning useless entries to simplify the build phase.
          pruneAndValidateTree();
  
          build(output, targetInvoiceId, false);
      }
docs: <p/>
  There is no limit in the depth of the tree,
  and the build strategy is to first consider the lowest child for a given period
  and go up the tree adding missing interval if needed. For e.g, one of the possible scenario:
  <pre>
  D1                                                  D2
  |---------------------------------------------------|   Plan P1
  D1'             D2'
  |---------------|/////////////////////////////|   Plan P2, REPAIR
  
  In that case we will generate:
  [D1,D1') on Plan P1; [D1', D2') on Plan P2, and [D2', D2) repair item
  
  <pre/>
  
  In the merge mode, the strategy is different, the tree is fairly shallow
  and the goal is to generate the repair items; @see addProposedItem
  
  @param output result list of built items
  @param targetInvoiceId