code: public void addChild(N child) {
      checkNotNull(child);
      tryRemoveFromOldParent(child);
      children.add(child);
      child.setParent(master);
    }
docs: Adds the given child.
  
  @param child The child to add.