code: public synchronized boolean addChild(Node child) {
      if (child.parent != null) {
        throw new IllegalArgumentException(
            "The child is already under another node:" + child.parent);
      }
      checkChildren();
      boolean retval = children.add(child);
      if (retval) child.parent = this;
      return retval;
    }
docs: Add a child node to this node.
  @param child The child node to be added. The child node should currently not be belong to another cluster topology.
  @return Boolean indicating whether the node is successfully added.