public void addChild(TreeNode node) {

        if (children == null)
            children = new ArrayList<TreeNode>();
        children.add(node);

    }
public void addChild(TreeNode node) {

        if (children == null)
            children = new ArrayList<TreeNode>();
        children.add(node);

    }
public void addChild ( TreeNode node ) { if ( children == null ) children = new ArrayList < TreeNode > ( ) ; children . add ( node ) ; }
Add a new child node to this node.

@param node The new child node
Add a new child node to this node .