public static PsiReference[] restrict(FileReferenceSet set, final Condition<? super PsiFile> cond, final Boolean soft) {
    final FileReference[] references = set.getAllReferences();

    return ContainerUtil.map2Array(references, PsiReference.class, (NotNullFunction<FileReference, PsiReference>)fileReference -> new MyFileReference(fileReference, cond, soft));
  }
public static PsiReference[] restrict(FileReferenceSet set, final Condition<? super PsiFile> cond, final Boolean soft)