void (CheckedTreeNode node, Set<String> excluded, boolean parentIsExcluded) { boolean isExcluded = parentIsExcluded || excluded.contains(getGroupAndArtifactId(node)); node.setChecked(!isExcluded); Enumeration children = node.children(); while (children.hasMoreElements()) { Object child = children.nextElement(); uncheckExcludedNodes((CheckedTreeNode)child, excluded, isExcluded); } }