void (AbstractTreeNode node, TreeItem<Pair<AbstractUrl, String>> treeItem) { final Collection<? extends AbstractTreeNode<?>> children = node.getChildren(); for (AbstractTreeNode child : children) { final TreeItem<Pair<AbstractUrl, String>> childTreeItem = new TreeItem<>(createPairForNode(child)); treeItem.addChild(childTreeItem); appendChildNodes(child, childTreeItem); } }