public static int[] deepFlatten(Object[] input) { return Arrays.stream(input) .flatMapToInt(o -> { if (o instanceof Object[]) { return Arrays.stream(deepFlatten((Object[]) o)); } return IntStream.of((Integer) o); }).toArray(); }
标签:integer class flat int 数组 post apt stat col
public static int[] deepFlatten(Object[] input) { return Arrays.stream(input) .flatMapToInt(o -> { if (o instanceof Object[]) { return Arrays.stream(deepFlatten((Object[]) o)); } return IntStream.of((Integer) o); }).toArray(); }
标签:integer class flat int 数组 post apt stat col
原文地址:https://www.cnblogs.com/R4mble/p/8408139.html