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

10
LINES

< > BotCompany Repo | #1032650 // addParamsToMap_inPlace

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3836L/22K).

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

Author comment

Began life as a copy of #1009709

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032650
Snippet name: addParamsToMap_inPlace
Eternal ID of this version: #1032650/3
Text MD5: b233449895f5050b5bb72b47d282bad1
Transpilation MD5: 95bc962b3eac2f0cb89dd0e00d34652e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-30 04:36:46
Source code size: 296 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 153 / 215
Version history: 2 change(s)
Referenced in: [show references]