docs: private List<TreeNode> getSelected(TreeNode parent) {
          List<TreeNode> result = new ArrayList<>();
          for (TreeNode n : parent.getChildren()) {
              if (n.isSelected()) {
                  result.add(n);
              }
              result.addAll(getSelected(n));
          }
          return result;
      }