当前位置:网站首页>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
边栏推荐
- Map in JS (including leetcode examples)
- Virtual machine installation deepin system
- 2022阿里巴巴全球数学竞赛 第4题 虎虎生威(盲盒问题、集卡问题)解决思路
- CubeMx DMA笔记
- Set the default style of scroll bar Google browser
- Pytest learning ----- pytest Interface Association framework encapsulation of interface automation testing
- Express logistics quick query method, set the unsigned doc No. to refresh and query automatically
- VMware installation win10 reports an error: operating system not found
- Ruby replaces gem Alibaba image
- Go implements leetcode rotation array
猜你喜欢

06 装饰(Decorator)模式

Solution: the agent throws an exception error

Simple and practical accounting software, so that accounts can be checked
![[understand one article] FD_ Use of set](/img/57/276f5ef438adee2cba31dceeabb95c.jpg)
[understand one article] FD_ Use of set

Gin framework learning code

Latest: the list of universities and disciplines for the second round of "double first-class" construction was announced

Pytest learning ----- pytest Interface Association framework encapsulation of interface automation testing

Mathematical knowledge -- understanding and examples of fast power

How to write a client-side technical solution

4. Flask cooperates with a tag to link internal routes
随机推荐
C# 基于MQTTNet的服务端与客户端通信案例
Cubemx DMA notes
The underlying principle of go map (storage and capacity expansion)
Gin framework learning code
Simple and practical accounting software, so that accounts can be checked
Save the CDA from the disc to the computer
Virtual machine installation deepin system
解决:代理抛出异常错误
Oracle stored procedure and job task setting
fastText文本分类
Go GC garbage collection notes (three color mark)
案例分享|智慧化的西部机场
[bus interface] Axi interface
数学知识(欧拉函数)
Line by line explanation of yolox source code of anchor free series network (7) -- obj in head_ loss、Cls_ Loss and reg_ Calculation and reverse transmission of loss I
Mathematical problems (number theory) trial division to judge prime numbers, decompose prime factors, and screen prime numbers
4. Flask cooperates with a tag to link internal routes
Application of intelligent robot in agricultural ecology
[understand one article] FD_ Use of set
Vmware安装win10报错:operating system not found