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

8
LINES

< > BotCompany Repo | #1024252 // cloneList_noSync

JavaX fragment (include)

static <A> ArrayList<A> cloneList_noSync(Iterable<A> l) {
  ret l instanceof Collection ? cloneList_noSync((Collection) l) : asList(l);
}

static <A> ArrayList<A> cloneList_noSync(Collection<A> l) {
  if (l == null) ret new L;
  ret new ArrayList<A>(l);
}

Author comment

Began life as a copy of #1001634

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024252
Snippet name: cloneList_noSync
Eternal ID of this version: #1024252/1
Text MD5: 1472fbb292194a5fbf7f1663854d9911
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-28 18:04:42
Source code size: 262 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 249 / 304
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)