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

10
LINES

< > BotCompany Repo | #1020014 // ciMapFromKeyAndValueField

JavaX fragment (include)

1  
static Map ciMapFromKeyAndValueField(Collection l, S keyField, S valueField) {
2  
  Map map = ciMap();
3  
  for (O o : l)
4  
    mapPut(map, getOpt(o, keyField), getOpt(o, valueField));
5  
  ret map;
6  
}
7  
8  
static Map ciMapFromKeyAndValueField(S keyField, S valueField, Collection l) {
9  
  ret ciMapFromKeyAndValueField(l, keyField, valueField);
10  
}

Author comment

Began life as a copy of #1011024

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: #1020014
Snippet name: ciMapFromKeyAndValueField
Eternal ID of this version: #1020014/2
Text MD5: 5adeab3002cfa13b3fdf87b2de28e4a2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-02 14:16:37
Source code size: 340 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 263 / 294
Version history: 1 change(s)
Referenced in: [show references]