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

7
LINES

< > BotCompany Repo | #1011524 // smallestList_asList - treat the result as immutable!

JavaX fragment (include)

static L smallestList_asList(O l) {
  if (l == null) ret ll();
  if (l cast Pair) ret ll(l.a, l.b);
  if (l cast T3) ret ll(l.a, l.b, l.c);
  if (l cast O[]) ret Arrays.asList(l);
  ret ll(l);
}

Author comment

Began life as a copy of #1011511

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1011524
Snippet name: smallestList_asList - treat the result as immutable!
Eternal ID of this version: #1011524/4
Text MD5: c5400812099c019534d6148525b24820
Author: stefan
Category: javax / collections
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-27 00:01:56
Source code size: 200 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 438 / 472
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1011673 - smallestList_toList - synonym of smallestList_asList - treat the result as immutable!
#1012282 - smallestList_toMutableList