Libraryless. Click here for Pure Java version (3836L/22K).
1 | static Map addParamsToMap_inPlace(Map map, O... params) { |
2 | if (map == null) null; |
3 | int n = l(params); |
4 | if (l(params) == 1 && params[0] instanceof Map) |
5 | putAll(map, (Map) params[0]); |
6 | else |
7 | for (int i = 0; i+1 < n; i += 2) |
8 | mapPut(map, params[i], params[i+1]); |
9 | ret map; |
10 | } |
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: | 154 / 216 |
Version history: | 2 change(s) |
Referenced in: | [show references] |