stream List转Map

Posted on 2020-02-29 11:10  wzhw2015  阅读(211)  评论(0编辑  收藏  举报

Map<String,String> itemMap = itemList.stream.collect(Collectors.toMap(Bean::getItemA,Bean::getItemB));

Copyright © 2024 wzhw2015
Powered by .NET 9.0 on Kubernetes