先上个栗子:
List<String> one = Lists.newArrayList("1","2","3","4","1","2","3","4");
List<String> oneReverse = Lists.reverse(one);
oneReverse.forEach(log::info);
log.info("----------");
List<List<String>> onePartition = Lists.partition(one,2);
log.info("外层list.size()={} 内层list.size()={}",onePartition.size(),onePartition.get(0).size());
onePartition.stream().forEach(list -> list.stream().forEach(log::info));
onePartition.stream().flatMap(i -> i.stream()).forEach(log::info); //这里注意两种写法的区别
log.info("----------");
Integer temp[] = new Integer[]{1,2,3,4,5,6,7,8,9};
List<Integer> two = Lists.asList(-1,0,temp);
two.forEach(i -> log.info(i.toStrin