is there a smart way to convert a list of strings of list into a list of integer list?
I have this List:
["0,0,0,0", "1,1,1,1"]
and I would like to get:
[[0,0,0,0],[1,1,1,1]]
I have tried this:
String comma = ",";
List<String> coords = Arrays.asList("0,0,0,0","1,1,1,1");
List<Integer> coordList = Arrays.asList(coords.get(0).split(comma)).stream()
.map(s -> Integer.parseInt(s))
.collect(Collectors.toList());