Libraryless. Click here for Pure Java version (2307L/15K).
static <A> L<A> sortedByScoreFunction_withoutZero(Iterable<A> l, IF1<A, Number> f) { new Map<A, Double> map; fOr (A a : l) { double score = toDouble(f.get(a)); if (score != 0) map.put(a, score); } ret keysSortedByValueDesc(map); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027329 |
Snippet name: | sortedByScoreFunction_withoutZero |
Eternal ID of this version: | #1027329/2 |
Text MD5: | 55e13ccf6030b3274d1fb42394da9a63 |
Transpilation MD5: | 9e7500cac27528fe9cb0322f15655566 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-03-06 13:12:16 |
Source code size: | 260 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 226 / 344 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |