NodeItem: new constructor sets parent properly
This commit is contained in:
parent
93a3f2ad42
commit
ff3a456657
1 changed files with 3 additions and 1 deletions
|
@ -63,7 +63,9 @@ class NodeItem<T> implements Node<T> {
|
|||
) {
|
||||
this.data = data;
|
||||
this.name = name;
|
||||
this.parent = parent;
|
||||
if (parent != null) {
|
||||
setParent(parent);
|
||||
}
|
||||
this.children.addAll(children);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue