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

13
LINES

< > BotCompany Repo | #1015268 // Scored - float-scored value. don't put null in here

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (2117L) is out of date.

sclass Scored<A> extends Var<A> {
  float score;
  
  *() {}
  *(A a, float score) { super(a); this.score = score; }
  *(A a, double score) { super(a); this.score = (float) score; }
  
  float score() { ret score; }
  
  toString {
    ret toIntPercent(score) + "%: " + str(get());
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, nazvggbglmsf, omdjrrnzbjjv, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1015268
Snippet name: Scored - float-scored value. don't put null in here
Eternal ID of this version: #1015268/10
Text MD5: 174d18eec93d4da8c23bc91634609e6d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-06 20:52:40
Source code size: 299 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 445 / 3225
Version history: 9 change(s)
Referenced in: [show references]