当前位置:网站首页>About stream flow, write it down briefly------

About stream flow, write it down briefly------

2022-04-23 16:49:00 A coir boat in the broken white clouds

  1. Comma concatenation list An object field in
millAndKilns.stream().map(MillAndKiln::getName).collect(Collectors.joining(","));
  1. Extract a field in the object set into a new set
List<Long> appUnitIds = appUnitVOPage.getRecords().stream().map(AppUnitListVO::getId).collect(Collectors.toList());
  1. according to id Make up of key-value form
 Map<Long, List<AppField>> appFieldMap = fields.stream().collect(Collectors.groupingBy(AppField::getAppId));
  1. Judge whether the MOG object field in the collection contains the specified value
 versions.stream().map(AppVersion::getIsShelf).collect(Collectors.toList()).contains(PlatformConstant.IsShelf.ON_THE_SHELF)
  1. The collection is sorted according to the MOG field
versions.stream().sorted(Comparator.comparing(AppVersion::getUpdateTime).reversed()).collect(Collectors.toList())

版权声明
本文为[A coir boat in the broken white clouds]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231400068121.html