docs: public void flatten(final boolean reverse) {
          if (!isBuilt) {
              build();
          }
  
          root = new ItemsNodeInterval();
          for (final Item item : items) {
              Preconditions.checkState(item.getAction() == ItemAction.ADD);
              root.addExistingItem(new ItemsNodeInterval(root, new Item(item, reverse ? ItemAction.CANCEL : ItemAction.ADD)));
          }
          items.clear();
          isBuilt = false;
      }