1 | static <A, B> LinkedHashMap<A, B> orderMapByComparator(Comparator<A> c, Map<A, B> map) { |
2 | L<A> l = new ArrayList(keys(map)); |
3 | sort(l, c); |
4 | new LinkedHashMap<A, B> map2; |
5 | for (A a : l) |
6 | map2.put(a, map.get(a)); |
7 | ret map2; |
8 | } |
Began life as a copy of #1014243
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: | #1015438 |
Snippet name: | orderMapByComparator |
Eternal ID of this version: | #1015438/1 |
Text MD5: | c1fe4f63d747ff7ca1b86880751f924d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-14 00:43:12 |
Source code size: | 237 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 337 / 371 |
Referenced in: | [show references] |