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

10
LINES

< > BotCompany Repo | #1017002 // pairsToParams

JavaX fragment (include)

1  
static <A, B> O[] pairsToParams(Collection<Pair<A, B>> l) {
2  
  O[] array = new O[l(l)*2];
3  
  Iterator<Pair<A, B>> it = iterator(l);
4  
  for (int i = 0; i < l(array); i += 2) {
5  
    Pair p = it.next();
6  
    array[i] = p.a;
7  
    array[i+1] = p.b;
8  
  }
9  
  ret array;
10  
}

Author comment

Began life as a copy of #1006543

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017002
Snippet name: pairsToParams
Eternal ID of this version: #1017002/2
Text MD5: 57af7bc4b3061d9893884e5fe304bf9b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-10 15:31:09
Source code size: 265 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 383 / 431
Version history: 1 change(s)
Referenced in: [show references]