@Override
public boolean apply(KongaTreeNode node) {
if (node instanceof ProjectNode) {
return true;
} else if (node instanceof FolderNode) {
FolderNode folder = (FolderNode) node;
return invalid.apply(folder.getUserObject()) || folder.hasMatchingChild(invalid);
} else if (node instanceof IntegrationEntityTreeNode) {
return invalid.apply(((IntegrationEntityTreeNode) node).getUserObject());
}
return false;
}