public void addUrl(URL url, URL child) {
        UrlItem todoItem = todo.get(child);
        UrlItem treeItem = tree.get(child);
        UrlItem childItem;
        if (todoItem == null && treeItem == null) {
            childItem = new UrlItem(child);
            todo.put(child, childItem);
        } else {
            childItem = todoItem == null ? treeItem : todoItem;
        }
        tree.get(url).children.add(childItem);
    }