List<HighxjRollVo> collect9 = highxjRollVoList.stream().filter(x -> x.getGradets().length() == 1 && gradelist.contains(x.getGradets())).filter(x -> !((Calendar.getInstance().get(Calendar.MONTH) + 1)-8 >0 ? ("20"+String.valueOf(Integer.valueOf(x.getHighStudentId().substring(0, 2))+Integer.valueOf(x.getGradets())-10)).equals(yearLast) : ("20"+String.valueOf(Integer.valueOf(x.getHighStudentId().substring(0, 2))+Integer.valueOf(x.getGradets())-10)).equals(beforeYearLast))).collect(Collectors.toList());
前辈写的,而且没有换行,全在一行里面
给我看的头疼,我都是让 gpt 帮我解释一下这行代码干了啥🤣
1
OutOfMemoryError 332 天前
idea 一键格式化不就好了么 这个项目的
|
2
hhjswf 332 天前 via Android
咋一看像前端混淆的代码
|
3
PungentSauce 332 天前
就俩过滤
|
4
chenPiMeiHaoChi 332 天前
道理我都懂,但为什么是 collect9 ?想想还有 12345678 就更吓人了。
|
5
assiadamo 332 天前
```
List<String> list = new ArryList<>(); for (int i = 0; i < strs.length; i++) { if (list.contains(strs[i])) continue; list.add(strs[i]); } ``` 刚刚看到的代码 |
6
haitaoli OP @chenPiMeiHaoChi 哈哈 看的好细 总共 collect29🤣
|
7
yazinnnn 331 天前
|
8
jasonjames 331 天前
大佬 囚牢囚牢
@haitaoli |
9
Jarred711 327 天前
In summary, the code filters a list of HighxjRollVo objects based on specific conditions using Java 8 Stream API. The resulting filtered elements are collected into a new list assigned to the collect9 variable.
|