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

7
LINES

< > BotCompany Repo | #1002058 // emptyToNull function

JavaX fragment (include)

1  
static S emptyToNull(S s) {
2  
  ret eq(s, "") ? null : s;
3  
}
4  
5  
static <A, B> Map<A, B> emptyToNull(Map<A, B> map) {
6  
  ret empty(map) ? null : map;
7  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002058
Snippet name: emptyToNull function
Eternal ID of this version: #1002058/2
Text MD5: 6cba74ac10bc9bc059aa6c3eea93d3c8
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-12 22:53:57
Source code size: 150 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 760 / 2341
Version history: 1 change(s)
Referenced in: [show references]