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

10
LINES

< > BotCompany Repo | #1020014 // ciMapFromKeyAndValueField

JavaX fragment (include)

static Map ciMapFromKeyAndValueField(Collection l, S keyField, S valueField) {
  Map map = ciMap();
  for (O o : l)
    mapPut(map, getOpt(o, keyField), getOpt(o, valueField));
  ret map;
}

static Map ciMapFromKeyAndValueField(S keyField, S valueField, Collection l) {
  ret ciMapFromKeyAndValueField(l, keyField, valueField);
}

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: 253 / 283
Version history: 1 change(s)
Referenced in: [show references]