1 | static <B, A extends Map<B, ? super S>> L<A> sortByMapKeyAlphaNum(Iterable<A> c, final B key) { |
2 | L<A> l = cloneList(c); |
3 | sort(l, new Comparator<A>() { |
4 | public int compare(A a, A b) { |
5 | ret cmpAlphaNum((S) mapGet((Map) a, (O) key), (S) mapGet((Map) b, (O) key)); |
6 | } |
7 | }); |
8 | ret l; |
9 | } |
Began life as a copy of #1021847
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021848 |
Snippet name: | sortByMapKeyAlphaNum |
Eternal ID of this version: | #1021848/4 |
Text MD5: | 73ca96677dc82367ae5c9b1a0f18cf33 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-02 14:39:46 |
Source code size: | 301 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 330 / 347 |
Version history: | 3 change(s) |
Referenced in: | [show references] |