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

8
LINES

< > BotCompany Repo | #1019864 // setVar_returnPrevious

JavaX fragment (include)

1  
static <A> A setVar_returnPrevious(IVar<A> v, A value) {
2  
  if (v == null) null;
3  
  synchronized(v) {
4  
    A prev = v!;
5  
    v.set(value);
6  
    ret prev;
7  
  }
8  
}

Author comment

Began life as a copy of #1016371

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019864
Snippet name: setVar_returnPrevious
Eternal ID of this version: #1019864/1
Text MD5: 7624e238ae17614ac35878a5ee884b40
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-29 09:14:02
Source code size: 161 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 282 / 302
Referenced in: [show references]