public static void mergeNodeChildren(TreeNode node){
  DefaultMutableTreeNode masterNode=(DefaultMutableTreeNode)node;
  for (int i=0; i < masterNode.getChildCount(); i++) {
    DefaultMutableTreeNode child=(DefaultMutableTreeNode)masterNode.getChildAt(i);
    if (!child.isLeaf()) {
      MergeHelpUtilities.mergeNodeChildren(DEFAULT_MERGE_TYPE,child);
    }
  }
}

public static void mergeNodeChildren ( TreeNode node ) { DefaultMutableTreeNode masterNode = ( DefaultMutableTreeNode ) node ; for ( int i = 0 ; i < masterNode . getChildCount ( ) ; i ++ ) { DefaultMutableTreeNode child = ( DefaultMutableTreeNode ) masterNode . getChildAt ( i ) ; if ( ! child . isLeaf ( ) ) { MergeHelpUtilities . mergeNodeChildren ( DEFAULT_MERGE_TYPE , child ) ; } } }
merge node children . merge the children of a node according to the merging rules of the parent . each subclass must implement this method
