code: public Node<T> addChild(Node<T> child) {
          if (children == null) {
              children = new ArrayList<Node<T>>();
          }
          child.parent = this;
          children.add(child);
  
          return child;
      }
docs: Adds a child to the list of children for this Node<T>. The addition of
  the first child will create a new List<Node<T>>.
  @param child a Node<T> object to set.