List转String[ ]:
List<String> titleList = new ArrayList<>();
titleList.add("1");
titleList.add("2");
titleList.add("3");
String[] strList = titleList.toArray(new String[titleList.size()]);
String[ ]转List:
List<String> list = Arrays.stream(strList).collect(Collectors.toList());
ArrayList将某一字段转换为List:
List<String> strList = list.stream().map(a -> a.get("id")).collect(Collectors.toList());
ArrayList将某一字段转换为String,用","相隔:
String str = StringUtils.join(list.stream().map(a -> a.get("id")).collect(Collectors.toList()),",")
Arrays找最大值,最小值:
int max = Arrays.stream(arr).max().getAsInt();
int min = Arrays.stream(arr).min().getAsInt();
JS-数组对象将某一字段转换为String,用","相隔:
var parm = "";
parm = list.map(function (e,i) {
return e.id
}).join(",");