void (SettingsTreeNode node) { for (Enumeration children = node.children(); children.hasMoreElements(); ) { Object child = children.nextElement(); if (child instanceof SettingsTreeNode settingsChild) { settingsChild.accepted = node.accepted; updateChildrenUi(settingsChild); } } }