public Node<T,E> addChild(String name,E kind){
  if (name == null || name.length() == 0) {
    throw new IllegalArgumentException("A node may not have a null name.");
  }
  Node<T,E> result=new Node<T,E>(name,this,kind);
  children.put(name,result);
  return result;
}

public Node < T , E > addChild ( String name , E kind ) { if ( name == null || name . length ( ) == 0 ) { throw new IllegalArgumentException ( "A node may not have a null name." ) ; } Node < T , E > result = new Node < T , E > ( name , this , kind ) ; children . put ( name , result ) ; return result ; }
add a new node with the given name of the given kind to this node . < p / > if an existing child has that name , replace the existing named sub - tree with a new single node with the provided name .
