私はこれらの手順に従おうとしています。
そして、「プロジェクトの作成」ステップに問題があります:
invalid inferred types for T,A; inferred type does not conform to declared bound(s)
inferred: java.lang.Object
bound(s): T
in ("return addAll(newHashSet(items));")
@NotNull
public static <T> Set<T> set(@NotNull T ... items) {
return addAll(newHashSet(items));
}
@NotNull
public static <T, A extends T, C extends Collection<T>> C addAll(@NotNull C collection, @NotNull A... elements) {
//noinspection ManualArrayToCollectionCopy
for (T element : elements) {
collection.add(element);
}
return collection;
}
奇妙に思えます-ソースコードは実際のものであり、プロジェクト構成の問題である可能性があると思います。何か案は?