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

9
LINES

< > BotCompany Repo | #1016577 // set_trueIfChanged

JavaX fragment (include)

sbool set_trueIfChanged(O o, S field, O value) {
  if (eq(get(o, field), value)) false;
  set(o, field, value);
  true;
}

static <A> bool set_trueIfChanged(IVar<A> v, A value) {
  ret setVar_trueIfChanged(v, value);
}

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: 455 / 592
Version history: 2 change(s)
Referenced in: [show references]