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

6
LINES

< > BotCompany Repo | #1020798 // tempSetOpt

JavaX fragment (include)

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

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