void (List<CoverageSuite> suites) { TreeUtil.treeNodeTraverser(myRootNode).traverse(TreeTraversal.PRE_ORDER_DFS).processEach(treeNode -> { if (treeNode instanceof CheckedTreeNode checkedTreeNode) { final Object userObject = checkedTreeNode.getUserObject(); checkedTreeNode.setChecked(userObject instanceof CoverageSuite && suites.contains(userObject)); } return true; }); }