code: public UNode addChildNode(UNode childNode) throws IllegalArgumentException {
          assert m_type == NodeType.ARRAY || m_type == NodeType.MAP;
          assert childNode != null;
          assert childNode.m_parent == null;
          
          // Allocate on first child addition.
          if (m_children == null) {
              m_children = new ArrayList<UNode>();
          }
          
          // Add to list first.
          m_children.add(childNode);
          childNode.m_parent = this;
          
          // For MAPs, also add to the child name map and ensure the name is unique.
          if (m_type == NodeType.MAP) {
              if (m_childNodeMap == null) {
                  m_childNodeMap = new LinkedHashMap<String, UNode>();
              }
              UNode priorNode = m_childNodeMap.put(childNode.m_name, childNode);
              //assert priorNode == null : "Duplicate name ('" + childNode.m_name +
              //                           "') added to the same parent: " + m_name;
              if(priorNode != null) {
              	throw new RuntimeException("Duplicate name ('" + childNode.m_name +
                          "') added to the same parent: " + m_name);
              }
          }
          return childNode;
      }
docs: Add the given child node to this node, which must be a MAP or ARRAY. If this node
  is a MAP, the name of the child node must be unique among existing child nodes. The
  same node is returned as a result so the caller can do things like:
  <pre>
  UNode childNode = parentNode.addChildNode(UNode.createMapNode("foo"));
  </pre>
  
  @param  childNode                Child node to add.
  @return                          Same child node object passed as a parameter.
  @throws IllegalArgumentException If the child node name is not unique and this is
  a map.