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

9
LINES

< > BotCompany Repo | #1019472 // setAndReturn - set field in object (or set var) and return object

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9148L/50K).

1  
static <A> A setAndReturn(A o, S field, O value) {
2  
  set(o, field, value);
3  
  ret o;
4  
}
5  
6  
static <A> A setAndReturn(IVar<A> v, A value) {
7  
  setVar(v, value);
8  
  ret value;
9  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1019472
Snippet name: setAndReturn - set field in object (or set var) and return object
Eternal ID of this version: #1019472/5
Text MD5: 956b5cc1a4d825a51f2754e332bc0618
Transpilation MD5: 3d6e64392ecfa668eed2a84be855d47e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-17 16:15:09
Source code size: 177 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 308 / 401
Version history: 4 change(s)
Referenced in: [show references]