1 | static class Lowest<A> { |
2 | A a; |
3 | double score; |
4 | |
5 | void update(A x, double s) { |
6 | if (a == null || s < score) { |
7 | a = x; |
8 | score = s; |
9 | } |
10 | } |
11 | |
12 | Pair<A, Double> getPair() { |
13 | ret a == null ? null : pair(a, score); |
14 | } |
15 | } |
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: | #1004653 |
Snippet name: | OLD class Lowest - collect object with lowest value in something |
Eternal ID of this version: | #1004653/1 |
Text MD5: | 0ff0ddaddc3cff00d1387dbbda053e30 |
Author: | stefan |
Category: | javax / images |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-05 11:10:01 |
Source code size: | 253 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 585 / 788 |
Referenced in: | [show references] |