private static boolean match(Object o, Condition<? super PsiFile> cond) {
      return !(o instanceof PsiFileSystemItem) ||
              ((PsiFileSystemItem)o).isDirectory() ||
              (o instanceof PsiFile && cond.value((PsiFile)o));
    }
private static boolean match(Object o, Condition<? super PsiFile> cond)