Libraryless. Click here for Pure Java version (2466L/16K).
1 | static <A, B> void mapPutVerbose(S mapName, Map<A, B> map, A key, B value) { |
2 | if (map != null && key != null && value != null) { |
3 | B old = map.put(key, value); |
4 | if (!eq(value, old)) |
5 | print((old == null ? "Adding to" : "Updating") + " \*mapName*/: \*key*/ => \*value*/"); |
6 | } |
7 | } |
Began life as a copy of #1007227
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: | #1027781 |
Snippet name: | mapPutVerbose - mapPut + print |
Eternal ID of this version: | #1027781/1 |
Text MD5: | f4e2314c6b9838d0d95aed7d3788dd17 |
Transpilation MD5: | a0865ec5e9409c2704dfa17b833a799f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-04-11 18:26:50 |
Source code size: | 293 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 297 |
Referenced in: | [show references] |