stream流的一些妙用

求数组最小值

1
Arrays.stream(baseCosts).min().getAsInt()

装箱

Arrays.stream(arr).boxed().toArray(Integer[]::new)

拆箱

Arrays.stream(integers).mapToInt(Integer::valueOf).toArray()