NodeItem: initialise children set in field and make final

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
Paul Campbell 2016-03-14 15:40:51 +00:00
parent 1aa2daf14b
commit 79170b898a

View file

@ -18,7 +18,7 @@ public class NodeItem<T> implements Node<T> {
private Node<T> parent;
private Set<Node<T>> children;
private final Set<Node<T>> children = new HashSet<>();
/**
* Creates a root node.
@ -43,7 +43,6 @@ public class NodeItem<T> implements Node<T> {
if (parent != null) {
setParent(parent);
}
this.children = new HashSet<>();
}
@Override