void (@NotNull RestorableStateNode node, @NotNull String name) { if (obsoleteChecker.value(node)) { removeTreeListener(this); } if (nodeFilter.value(node)) { setSelectionPath(node.getPath()); removeTreeListener(this); // remove the listener on first match } }