Libraryless. Click here for Pure Java version (2527L/16K).
// creates map similar to map1 (if both are non-empty) static <A, B> Map<A, B> joinMaps(Map<A, B> map1, Map<A, B> map2) { if (empty(map2)) ret map1; if (empty(map1)) ret map2; Map map3 = cloneMap(map1); putAll(map3, map2); ret map3; }
Began life as a copy of #1023305
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029633 |
Snippet name: | joinMaps - map2 overrides map1 |
Eternal ID of this version: | #1029633/3 |
Text MD5: | 6880a98443dd50d32616ed7d6a5d70b3 |
Transpilation MD5: | 05c71a99adc0804ab50b723d9f66f25c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-08-31 16:43:24 |
Source code size: | 251 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 280 / 409 |
Version history: | 2 change(s) |
Referenced in: | [show references] |