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

7
LINES

< > BotCompany Repo | #1003294 // asArray - synonym of toObjectArray + another syntax

JavaX fragment (include)

1  
static O[] asArray(L l) {
2  
  return toObjectArray(l);
3  
}
4  
5  
static <A> A[] asArray(Class<A> type, L l) {
6  
  ret (A[]) l.toArray((O[]) Array.newInstance(type, l.size()));
7  
}

Author comment

Began life as a copy of #1002013

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003294
Snippet name: asArray - synonym of toObjectArray + another syntax
Eternal ID of this version: #1003294/1
Text MD5: 4783b9275935b5ef04ef8757128856ff
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-09-16 23:02:05
Source code size: 172 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 695 / 829
Referenced in: [show references]