List里的遍历
pmDesignFiles = pmDesignFiles.stream().map((m) -> {
m.setLocalPath(“234234”);
return m;
}).collect(Collectors.toList());
List分组
Map<String, List
List里取值某字段的列表
List
List里取某条件的列表:
List
List里用逗号拼接某列:
String nodesName = lstData.stream().map(m -> m.getNodeName()).collect(Collectors.joining(","));
import org.apache.commons.lang3.StringUtils
StringUtils.join(list1, ",")
字符串转数组
List
对象转数组
Arrays.asList(a) 或 new ArrayList<>(a)
import com.google.common.collect.Lists;
Lists.newArrayList("2","4" )