惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 一叶知秋。

从包含时间属性的对象列表中,筛选出时间≤指定时间参数且最接近该时间参数的那个对象 安装nginx和OpenSSL struts2的<s:if test>标签的注意点 mysql怎么写逻辑比较清晰? 设置idea 代码报错时不弹框显示 LigerUI 中的 Grid (ligerGrid) 合并单元格 mysql模糊查找数据库使用的字段名 spring RestTemplate忽略证书验证 关于easyExcel解析未添加@ExcelProperty报错问题分析 Nginx的常用命令(启动重启停止等) 解决远程调用三方接口:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException报错 msyql查询表的索引sql语句 MySQL查看表占用空间大小 js屏蔽回车提交 kettle同步表数据null处理 MySql 分组后获取距离时间最近的第一条数据 mysql解表和查看锁表 Windows关闭指定端口命令 Windows 技术篇-防火墙启用时指定外部可访问端口,防火墙开放端口设置
Collections.sort多个字段排序
一叶知秋。 · 2024-10-17 · via 博客园 - 一叶知秋。
//生效日期、操作时间倒序、机型组升序
private void sort(List<IntpathcostAreaGroupstVO> data){
Comparator<Object> com = Collator.getInstance(java.util.Locale.CHINA);
Collections.sort(data,new Comparator<IntpathcostAreaGroupstVO>() {
@Override
public int compare(IntpathcostAreaGroupstVO o1, IntpathcostAreaGroupstVO o2) {
String startDate1=DateUtils.date2Str(o1.getStartDate(),DateUtils.YYYY_MM_DD_HHMMSS);//生效日期
String operateTime1=DateUtils.date2Str(o1.getOperateTime(),DateUtils.YYYY_MM_DD_HHMMSS);//操作时间
String groupingName1=o1.getGroupingName();//机型组

String startDate2=DateUtils.date2Str(o2.getStartDate(),DateUtils.YYYY_MM_DD_HHMMSS);//生效日期
String operateTime2=DateUtils.date2Str(o2.getOperateTime(),DateUtils.YYYY_MM_DD_HHMMSS);//操作时间
String groupingName2=o2.getGroupingName();//机型组

int startDate=com.compare(startDate2,startDate1);//倒序
int operateTime=com.compare(operateTime2,operateTime1);//倒序
int groupingName=com.compare(groupingName1,groupingName2);//升序

if(startDate!=0){
return startDate;
}else if(operateTime!=0){
return operateTime;
}else {
return groupingName;
}
}
});
}