code: private static <T, N extends IntervalTreeNode<T, N>> void searchMtasTreeItemWithIntervalTree(
        Collection<Integer> additionalIds, MtasTreeItem treeItem,
        IntervalTreeNode<T, N> intervalTreeNode) {
      ArrayList<IntervalTreeNode<T, N>> checkList = new ArrayList<IntervalTreeNode<T, N>>();
      checkList.add(intervalTreeNode);
      do {
        IntervalTreeNode<T, N> checkItem = checkList.remove(checkList.size() - 1);
        searchMtasTreeItemWithIntervalTree(additionalIds, checkItem,
            treeItem.left, treeItem.right, treeItem.objectRefs,
            treeItem.additionalIds, treeItem.additionalRefs, checkList);
      } while (checkList.size() > 0);
    }
docs: Search mtas tree item with interval tree.
  
  @param <T> the generic type
  @param <N> the number type
  @param additionalIds the additional ids
  @param treeItem the tree item
  @param intervalTreeNode the interval tree node