雪洗中关村

导航

2020年1月14日 #

java8--- groupingBy partitioningBy ,skip()+limit() 分页

摘要: //使用skip()和limit()进行分页 public static void pages() { int pageSize = 2; int pageIndex = 2; List<Integer> expected = Lists.newArrayList(61, 62, 63, 64, 6 阅读全文

posted @ 2020-01-14 17:45 雪洗中关村 阅读(1340) 评论(0) 推荐(0) 编辑

java8--- 手动实现Collector.toList() reduce

摘要: 上述的demo中发现reduce和collect的作用几乎一样,都是返回一个最终的结果,比如,我们可以使用reduce实现toList效果: //手动实现toListCollector 滥用reduce, 不可变的规约 不可以并行 List<Integer> calories = dishes.st 阅读全文

posted @ 2020-01-14 17:43 雪洗中关村 阅读(849) 评论(0) 推荐(0) 编辑

java8--- Date API

摘要: 推荐: https://yq.aliyun.com/articles/256854?spm=a2c4e.11153940.0.0.6a255562myIiAj date time api Clock Clock提供访问当前日期和时间。Clock是对当前时区敏感的,可以用来代替System.curre 阅读全文

posted @ 2020-01-14 16:23 雪洗中关村 阅读(256) 评论(0) 推荐(0) 编辑