private List<Integer> defectKeyToList(String defectKey) {
List<Integer> list = new ArrayList();
String replaceDefect = StringUtils.replace(defectKey, "[", "").replace("]", "");
String[] splitDefect = replaceDefect.split(",");
List<String> defectList = Arrays.asList(splitDefect);
for (String ss : defectList) {
int i = Integer.parseInt(ss);
list.add(i);
}
return list;
}
如何把字符串类型的数组转List集合
最新推荐文章于 2024-04-23 18:52:22 发布