Collection<List<Foo>>aをタイプ の 2D 配列に変換するにはどうすればよいFoo[][]ですか?
メソッドを使用しようとしてtoArrayいますが、構文がわかりません。たとえば、これは機能しません:
import com.google.common.collect.Collections2;
Collection<List<Foo>> permuted = Collections2.permutations(bar);
Foo[][] permutedArray = permuted.toArray(new Foo[10][10]);//exception here
投げてArrayStoreExceptionいます。この場合、 の型はpermutedArray何ですか?