当前位置:网站首页>Collectors. Groupingby sort
Collectors. Groupingby sort
2022-07-02 05:04:00 【zh_ four hundred and four】
background
Recently, project development used to group collections , After grouping according to the area, it is found that the order is inconsistent with the set
Find the problem
The data set found
Use after sorting groupingBy Aggregate , It is found that the order of data has changed
The exploration process
Open source
The first parameter : Group by which field
The second parameter : What container does the group use to save and return
The third parameter : How to collect the results after grouping
The problem should be the second parameter The default with hashmap Save the grouped data hashmap disorder
Problem solving
Replace the second parameter with LinkedHashMap
边栏推荐
- Lay the foundation for children's programming to become a basic discipline
- Promise all()
- 國產全中文-自動化測試軟件Apifox
- Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
- Splice characters in {{}}
- 案例分享|智慧化的西部机场
- How to modify data file path in DM database
- Use of typescript classes
- [understand one article] FD_ Use of set
- Pyechart1.19 national air quality exhibition
猜你喜欢
Getting started with pytest ----- confitest Application of PY
2022 Alibaba global mathematics competition, question 4, huhushengwei (blind box problem, truck problem) solution ideas
Pyechart1.19 national air quality exhibition
Online incremental migration of DM database
win10 磁盘管理 压缩卷 无法启动问题
Typescript function details
Pytest learning ----- pytest Interface Association framework encapsulation of interface automation testing
Learn BeanShell before you dare to say you know JMeter
DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
Embedded-c language-8-character pointer array / large program implementation
随机推荐
Basic differences between Oracle and MySQL (entry level)
DC-1靶场搭建及渗透实战详细过程(DC靶场系列)
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
Vmware安装win10报错:operating system not found
js中的Map(含leetcode例题)
10 minute quick start UI automation ----- puppeter
正大美欧4的主账户关注什么数据?
oracle 存储过程与job任务设置
The reason why sizeof (ARR) / sizeof (arr[0]) is used in the function to calculate the length of the array is incorrect
Mouse events in JS
Exercise notes 13 (effective letter ectopic words)
go实现leetcode旋转数组
数学问题(数论)试除法做质数的判断、分解质因数,筛质数
C# 图片显示占用问题
洛谷入门3【循环结构】题单题解
Future trend of automated testing ----- self healing technology
Record my pytorch installation process and errors
Typescript function details
[understand one article] FD_ Use of set
6.30 year end summary, end of student age