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

11
LINES

< > BotCompany Repo | #1004236 // newList - always returns a new ArrayList (no wrapping)

JavaX fragment (include)

static <A> ArrayList<A> newList(A[] a) {
  ret asList(a);
}

static ArrayList<Integer> newList(int[] a) {
  ret asList(a);
}

static <A> ArrayList<A> newList(Collection<A> s) {
  ret asList(s);
}

Author comment

Began life as a copy of #1000999

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004236
Snippet name: newList - always returns a new ArrayList (no wrapping)
Eternal ID of this version: #1004236/1
Text MD5: 2083615850fb3488eb0d632094fa16ca
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-10 19:32:24
Source code size: 205 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 421 / 416
Referenced in: [show references]