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

9
LINES

< > BotCompany Repo | #1002494 // toList - synonym of asList

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

Libraryless. Click here for Pure Java version (361L/2K).

static <A> ArrayList<A> toList(A[] a) { ret asList(a); }
static ArrayList<Integer> toList(int[] a) { ret asList(a); }
static ArrayList<Short> toList(short[] a) { ret asList(a); }
static ArrayList<Long> toList(long[] a) { ret asList(a); }
static ArrayList<Double> toList(double[] a) { ret asList(a); }
static ArrayList<Byte> toList(byte[] a) { ret asList(a); }
static ArrayList<Float> toList(float[] a) { ret asList(a); }
static <A> ArrayList<A> toList(Set<A> s) { ret asList(s); }
static <A> ArrayList<A> toList(Iterable<A> s) { ret asList(s); }

Author comment

Began life as a copy of #1002092

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002494
Snippet name: toList - synonym of asList
Eternal ID of this version: #1002494/7
Text MD5: 60caddd89c04047bfc19985ddcc15da5
Transpilation MD5: 2133dff1ee2b448e2b7087a421383e3b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2026-03-15 03:28:56
Source code size: 553 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 1736 / 1924
Version history: 6 change(s)
Referenced in: [show references]