foreach循环和lambda表达式java

时间:2015-11-18 13:37:11

标签: java foreach

不要理解合成症有什么问题。最后一行不正确。

           rost.entrySet().stream()
            .map(entry -> rost.get(entry.getKey()))
            .map(each -> each.entrySet())
            .flatMap(Collection::stream)
            .map(entry -> entry.getValue())
            .map(each -> each.entrySet())
            .flatMap(Collection::stream)
            .map(entry -> entry.getValue())
            .map(each -> each.entrySet())
            .flatMap(Collection::stream)
            .map(entry -> entry.getValue()).forEach((group) ->
//// after this I have error
            {group.forEach(record->{filterCriteria1(record)})}

0 个答案:

没有答案