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

15
LINES

< > BotCompany Repo | #1001241 - concatLists

JavaX fragment (include)

1  
static <A> L<A> concatLists(Collection<A>... lists) {
2  
  new L<A> l;
3  
  if (lists != null) for (Collection<A> list : lists)
4  
    if (list != null)
5  
      l.addAll(list);
6  
  return l;
7  
}
8  
9  
static <A> L<A> concatLists(Collection<? extends Collection<A>> lists) {
10  
  new L<A> l;
11  
  if (lists != null) for (Collection<A> list : lists)
12  
    if (list != null)
13  
      l.addAll(list);
14  
  return l;
15  
}

download  show line numbers  debug dex   

Travelled to 13 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, omdjrrnzbjjv, onxytkatvevr, tslmcundralx, tvejysmllsmz, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001241
Snippet name: concatLists
Eternal ID of this version: #1001241/5
Text MD5: 2e8abf537432829fa721a35789688e8b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-22 17:34:28
Source code size: 395 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 463 / 1962
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001241 & http://1001241.tinybrain.de