Libraryless. Click here for Pure Java version (2568L/16K).
1 | static <B, C, A extends Map<B, C>, D> L<A> lambdaMapLike sortByTransformedMapKey(IF1<C, D> transform, Iterable<A> c, B key) {
|
2 | L<A> l = cloneList(c); |
3 | sort(l, (a, b) -> |
4 | stdcompare(transform.get(mapGet(a, key)), transform.get(mapGet(b, key)))); |
5 | ret l; |
6 | } |
Began life as a copy of #1021847
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1029831 |
| Snippet name: | sortByTransformedMapKey - not the clearest name |
| Eternal ID of this version: | #1029831/6 |
| Text MD5: | 77adb76cd5cf662142c378c1aaf5209a |
| Transpilation MD5: | 0f98720e90d90191d2c61cb1446c3809 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-09-21 13:14:25 |
| Source code size: | 265 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 540 / 677 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |