回答編集履歴
1
list.toArray(Data[]::new)からlist.stream().toArray(Data[]::new)に変更
answer
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
```Java
|
4
4
|
public static Map<Integer, Map<Integer, Data[]>> toArrayMap(Map<Integer, Map<Integer, List<Data>>> listMap) {
|
5
|
-
return transformValues(listMap, map -> transformValues(map, list -> list.toArray(Data[]::new)));
|
5
|
+
return transformValues(listMap, map -> transformValues(map, list -> list.stream().toArray(Data[]::new)));
|
6
6
|
}
|
7
7
|
|
8
8
|
public static <S, T, U> Map<S, U> transformValues(Map<S, T> map, Function<T, U> transformer) {
|