摘要:
Comparator<Object> comparator = Comparator.comparing(Obj::getValue); 小顶堆: PriorityQueue minHeap = new PriorityQueue(comparator); 大顶堆: PriorityQueue ma 阅读全文
摘要:
JDK源码 java.util.stream.Collectors#collectingAndThen方法的作用是将Collector的结果在执行一个额外的finisher转换操作,其源码如下: /** * Adapts a {@code Collector} to perform an addit 阅读全文