void (@NotNull NotificationParentGroupBean parent, @NotNull DefaultMutableTreeNode node, @NotNull Map<NotificationParentGroupBean, List<DefaultMutableTreeNode>> parentChildrenTable) { for (NotificationParentGroupBean child : NotificationParentGroup.getChildren(parent)) { DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child); addParentGroup(child, childNode, parentChildrenTable); node.add(childNode); } List<DefaultMutableTreeNode> nodes = parentChildrenTable.get(parent); if (nodes != null) { for (DefaultMutableTreeNode childNode : nodes) { node.add(childNode); } } }