Libraryless. Click here for Pure Java version (64L/1K).
1 | static L<Map> sortedByMapElement(Collection<Map> c, final O 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(a.get(key), b.get(key)); |
6 | } |
7 | }); |
8 | ret l; |
9 | } |
Began life as a copy of #1005972
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1010437 |
| Snippet name: | sortedByMapElement |
| Eternal ID of this version: | #1010437/4 |
| Text MD5: | ba03f5b6509e6f252de6f4706aafa136 |
| Transpilation MD5: | 9ba084a77a58ddb0656c6284d20ae1ba |
| 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:33:49 |
| Source code size: | 240 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 584 / 710 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |