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

9
LINES

< > BotCompany Repo | #1008560 // notNullOnly - drop nulls from list

JavaX fragment (include)

1  
static <A> L<A> notNullOnly(L<A> l) {
2  
  new L<A> out;
3  
  for (A a : unnull(l)) if (a != null) out.add(a);
4  
  ret out;
5  
}
6  
7  
static <A> L<A> notNullOnly(A... l) {
8  
  ret notNullOnly(asList(l));
9  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008560
Snippet name: notNullOnly - drop nulls from list
Eternal ID of this version: #1008560/2
Text MD5: 9dc75ff65b6a96590e535bba1e4de55f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-27 01:27:11
Source code size: 196 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 413 / 444
Version history: 1 change(s)
Referenced in: [show references]