标签:方法 tin 用法 cto box str 去重 list nbsp
如果要处理int[] 转换成 List<Integer>这种形式的,可以用下面这个方法:
List<Integer> orgIds = Arrays.stream(reqVo.organizationIds).boxed().collect(Collectors.toList());
过滤去重可以用下面这个方法:
List<Integer> newOrgIds =orgIds .stream().distinct().collect(Collectors.toList());
标签:方法 tin 用法 cto box str 去重 list nbsp
原文地址:https://www.cnblogs.com/PrayzzZ/p/10694362.html