static <A, B> LinkedHashMap<A, B> lhm_replaceFirstKey(Map<A, B> map, A newKey) { new LinkedHashMap<A, B> out; bool first = true; for (A a, B b : unnull(map)) { if (first) { out.put(newKey, b); first = false; } else out.put(a, b); } ret out; }
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019283 |
Snippet name: | lhm_replaceFirstKey |
Eternal ID of this version: | #1019283/2 |
Text MD5: | b45d02bd5706d92995c5e8b3244dd525 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-29 12:18:54 |
Source code size: | 289 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 305 / 339 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |