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

9
LINES

< > BotCompany Repo | #1004244 // addIfNotEmpty

JavaX fragment (include)

1  
static void addIfNotEmpty(Collection<S> l, S s) {
2  
  if (nempty(s))
3  
    l.add(s);
4  
}
5  
6  
static void addIfNotEmpty(Collection l, Map m) {
7  
  if (nempty(m))
8  
    l.add(m);
9  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004244
Snippet name: addIfNotEmpty
Eternal ID of this version: #1004244/1
Text MD5: b38249b5e8d277adc79830589a0f7e60
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-11-26 16:00:25
Source code size: 173 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 631 / 632
Referenced in: [show references]