private static void replaceChildren(final DefaultMutableTreeNode node, final Collection<? extends ElementNode> arrayList) {
    node.removeAllChildren();
    for (ElementNode child : arrayList) {
      node.add(child);
    }
  }
private static void replaceChildren(final DefaultMutableTreeNode node, final Collection<? extends ElementNode> arrayList)