Loading

摘要: Comparator<Object> comparator = Comparator.comparing(Obj::getValue); 小顶堆: PriorityQueue minHeap = new PriorityQueue(comparator); 大顶堆: PriorityQueue ma 阅读全文
posted @ 2021-08-09 20:56 dai.sp 阅读(329) 评论(0) 推荐(0) 编辑
摘要: JDK源码 java.util.stream.Collectors#collectingAndThen方法的作用是将Collector的结果在执行一个额外的finisher转换操作,其源码如下: /** * Adapts a {@code Collector} to perform an addit 阅读全文
posted @ 2021-08-09 19:52 dai.sp 阅读(1007) 评论(0) 推荐(0) 编辑