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