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

13
LINES

< > BotCompany Repo | #1001241 // concatLists

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

Libraryless. Click here for Pure Java version (59L/1K).

static <A> L<A> concatLists(Iterable<A>... lists) {
  new L<A> l;
  if (lists != null) for (Iterable<A> list : lists)
    addAll(l, list);
  return l;
}

static <A> L<A> concatLists(Collection<? extends Iterable<A>> lists) {
  new L<A> l;
  if (lists != null) for (Iterable<A> list : lists)
    addAll(l, list);
  return l;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, omdjrrnzbjjv, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1001241
Snippet name: concatLists
Eternal ID of this version: #1001241/8
Text MD5: 14f5b4c1805e0a75850f54aae67a6128
Transpilation MD5: 73b88e02ef4ac73afa123f1954a97b0a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-28 12:41:02
Source code size: 339 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 886 / 2600
Version history: 7 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1010810 - concatWebLists
#1012066 - concatLists_conservative - use any of the lists verbatim if the others are empty
#1015558 - concatListsToSet (HashSet)
#1027503 - concatLists_uniquify
#1030442 - concatLists_syncIndividual - sync on each list being appended
#3000382 - Answer for ferdie (>> t = 1, f = 0)