boolean (final Condition<? super PsiFile> condition) { for(BasePsiNode<? extends PsiElement> child: myChildren) { if (condition.value(child.getValue().getContainingFile())) { return true; } } return false; }