我有List<List<String>>。我想根据内部List的特定元素将其转换为Map。
List<List<String>>
我试过了
ddList.stream().flatMap(x -> x.stream() .collect(Collectors.toMap(Function.identity(), String::length)));
它不起作用。这是怎么了?
java collections lambda java-8
collections ×1
java ×1
java-8 ×1
lambda ×1