Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1004653 // OLD class Lowest - collect object with lowest value in something

JavaX fragment (include)

static class Lowest<A> {
  A a;
  double score;
  
  void update(A x, double s) {
    if (a == null || s < score) {
      a = x;
      score = s;
    }
  }
  
  Pair<A, Double> getPair() {
    ret a == null ? null : pair(a, score);
  }
}

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: 530 / 724
Referenced in: [show references]