Libraryless. Click here for Pure Java version (30L/1K).
1 | static <A, B> void mapPut(Map<A, B> map, A key, B value) {
|
2 | if (map != null && key != null && value != null) map.put(key, value); |
3 | } |
4 | |
5 | ifclass Pair |
6 | static <A, B> void mapPut(Map<A, B> map, Pair<A, B> p) {
|
7 | if (map != null && p != null) map.put(p.a, p.b); |
8 | } |
9 | endif |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1007227 |
| Snippet name: | mapPut - put into map if key & value are not null |
| Eternal ID of this version: | #1007227/3 |
| Text MD5: | 5ddcc7447445f226b4eb71e91c850de6 |
| Transpilation MD5: | 24234ff0e601e07c85894d240c766e26 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-23 20:05:09 |
| Source code size: | 270 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1030 / 1203 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |