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

7
LINES

< > BotCompany Repo | #1018203 // callFOrKeep - keep argument if function is null

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

Libraryless. Click here for Pure Java version (2482L/16K).

1  
static <A> A callFOrKeep(O f, A arg) {
2  
  ret f == null ? arg : (A) callF(f, arg);
3  
}
4  
5  
static <A> A callFOrKeep(IF1<A> f, A arg) {
6  
  ret callFOrKeep((O) f, arg);
7  
}

Author comment

Began life as a copy of #1012255

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018203
Snippet name: callFOrKeep - keep argument if function is null
Eternal ID of this version: #1018203/2
Text MD5: 5b396bb683c2e0e30a640e006eaac701
Transpilation MD5: c2a4719958643c0671e138bc2c54760e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-10 14:12:11
Source code size: 167 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 415 / 516
Version history: 1 change(s)
Referenced in: [show references]