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

9
LINES

< > BotCompany Repo | #1016577 // set_trueIfChanged

JavaX fragment (include)

1  
sbool set_trueIfChanged(O o, S field, O value) {
2  
  if (eq(get(o, field), value)) false;
3  
  set(o, field, value);
4  
  true;
5  
}
6  
7  
static <A> bool set_trueIfChanged(IVar<A> v, A value) {
8  
  ret setVar_trueIfChanged(v, value);
9  
}

Author comment

Began life as a copy of #1014784

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016577
Snippet name: set_trueIfChanged
Eternal ID of this version: #1016577/3
Text MD5: 23b774fdb1e48ddbe9a34e8f08ff7c83
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-24 19:27:16
Source code size: 226 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 457 / 595
Version history: 2 change(s)
Referenced in: [show references]