Array to a list

  E.g. Integer String array transformed into generic List 
String [] = pathArr deptPath.split ( ",");
Lit <Integer> = deptIds Arrays.stream (pathArr) .map (Integer :: valueOf) .collect (Collectors.toList ());

  if it is transformed into another generic map on the change in the Function, turn into String type e.g.
String [] pathArr = deptPath.split(",");
Lit<String> deptIds = Arrays.stream(pathArr).map(String::valueOf).collect(Collectors.toList());

Guess you like

Origin www.cnblogs.com/luizw/p/11423803.html