//int数组转set集合
//1.转换成stream,2.包装,3.stream转Set
Set<Integer> set= Arrays.stream(array).boxed().collect(Collectors.toSet());
//错误举例,array元素需为包装类
Set<Integer> set=new HashSet<>(Arrays.asList(array));
//List<Integer> 转 int[]
//1.list转换成stream,2.转换为int流,3.转换为int[].
int[] array=list.stream().mapToInt(Integer::valueOf).toArray();
//String[]优雅地转int[]
//String[]->stream->integer stream->int[]
int[] ints=Arrays.stream(strings).mapToInt(Integer::valueOf).toArray();