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

8
LINES

< > BotCompany Repo | #1019910 // asLinkedList

JavaX fragment (include)

1  
static <A> LinkedList<A> asLinkedList(Iterable<A> s) {
2  
  if (s cast LinkedList) ret s;
3  
  new LinkedList l;
4  
  if (s != null)
5  
    for (A a : s)
6  
      l.add(a);
7  
  ret l;
8  
}

Author comment

Began life as a copy of #1000999

download  show line numbers  debug dex  old transpilations   

Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1019910
Snippet name: asLinkedList
Eternal ID of this version: #1019910/1
Text MD5: e4dd6029ead111be9e032832ea042717
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-30 21:45:21
Source code size: 175 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 372 / 402
Referenced in: [show references]