1 | static Map paramsToMap(O... params) {
|
2 | int n = l(params); |
3 | if (l(params) == 1 && params[0] instanceof Map) ret (Map) params[0]; |
4 | new LinkedHashMap map; |
5 | for (int i = 0; i+1 < n; i += 2) |
6 | mapPut(map, params[i], params[i+1]); |
7 | ret map; |
8 | } |
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: | 840 / 886 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |