NodeItem: new constructor sets parent properly

This commit is contained in:
Paul Campbell 2016-09-20 22:40:32 +01:00
parent 93a3f2ad42
commit ff3a456657

View file

@ -63,7 +63,9 @@ class NodeItem<T> implements Node<T> {
) { ) {
this.data = data; this.data = data;
this.name = name; this.name = name;
this.parent = parent; if (parent != null) {
setParent(parent);
}
this.children.addAll(children); this.children.addAll(children);
} }