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

6
LINES

< > BotCompany Repo | #1020798 // tempSetOpt

JavaX fragment (include)

static AutoCloseable tempSetOpt(final O o, fS field, O value) {
  if (!hasFieldNamed(o, field)) null;
  fO oldValue = getOpt(o, field);
  setOpt(o, field, value);
  ret autoCloseable { setOpt(o, field, oldValue); };
}

Author comment

Began life as a copy of #1016243

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020798
Snippet name: tempSetOpt
Eternal ID of this version: #1020798/1
Text MD5: 12abaf8ffd7776bfd4fe1d53a2acaea0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-03 02:42:46
Source code size: 222 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 266 / 294
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)