public static @Nullable PsiTypeParameterList createTypeParameterListWithUsedTypeParameters(final @Nullable PsiTypeParameterList fromList,
                                                                                             Condition<? super PsiTypeParameter> filter,
                                                                                             final PsiElement @NotNull ... elements) {
    if (elements.length == 0) return null;
    final Set<PsiTypeParameter> used = new HashSet<>();
public static @Nullable PsiTypeParameterList createTypeParameterListWithUsedTypeParameters(final @Nullable PsiTypeParameterList fromList,
                                                                                             Condition<? super PsiTypeParameter> filter,
                                                                                             final PsiElement @NotNull ... elements) {
    if (elements.length == 0) return null;
    final Set<PsiTypeParameter> used = new HashSet<>()