What would be the right parameter to change the parent of the node to a root when deleting a collection or leaf node in CollectionNode.java?
protected void deletingNode() {
// Update child nodes to use the parent node of this node as the new parent node
for (Node node : getNodes()) {
node.changeParent(parent);
}
}
Would this be right?
protected void deletingNode() {
// Update child nodes to use the parent node of this node as the new parent node
for (Node node : getNodes()) {
node.changeParent("");
}
}
Or how to move a deleted node under a specified node like Orphans:
protected void deletingNode() {
// Update child nodes to use the parent node of this node as the new parent node
for (Node node : getNodes()) {
node.changeParent(“Orphans”);
}
}