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

8
LINES

< > BotCompany Repo | #1009709 // paramsToMap - object array to map. also takes Map as single array element

JavaX fragment (include)

static Map paramsToMap(O... params) {
  int n = l(params);
  if (l(params) == 1 && params[0] instanceof Map) ret (Map) params[0];
  new LinkedHashMap map;
  for (int i = 0; i+1 < n; i += 2)
    mapPut(map, params[i], params[i+1]);
  ret map;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009709
Snippet name: paramsToMap - object array to map. also takes Map as single array element
Eternal ID of this version: #1009709/3
Text MD5: 79964802f0a8ea154eaf41cc6ed11620
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-10 23:12:09
Source code size: 250 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 575 / 609
Version history: 2 change(s)
Referenced in: [show references]