Libraryless. Click here for Pure Java version (68L/1K).
1 | static L<Map> sortedByMapElementDesc(Collection<Map> c, fO key) {
|
2 | L<Map> l = new ArrayList(c); |
3 | sort(l, new Comparator<Map>() {
|
4 | public int compare(Map a, Map b) {
|
5 | ret cmp(b.get(key), a.get(key)); |
6 | } |
7 | }); |
8 | ret l; |
9 | } |
10 | |
11 | static L<Map> mapMethodLike sortedByMapElementDesc(fO key, Collection<Map> c) {
|
12 | ret sortedByMapElementDesc(c, key); |
13 | } |
Began life as a copy of #1010437
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024891 |
| Snippet name: | sortedByMapElementDesc |
| Eternal ID of this version: | #1024891/3 |
| Text MD5: | ab4973d677e91577e3a5d367d01d3232 |
| Transpilation MD5: | b93c40b25e892686a6dca18ff8ac0e55 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-08-28 22:34:37 |
| Source code size: | 364 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 425 / 558 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |