Libraryless. Click here for Pure Java version (2792L/16K).
static <A, B> void syncMapPut2(Map<A, B> map, A key, B value) { if (map != null && key != null) synchronized(collectionMutex(map)) { if (value != null) map.put(key, value); else map.remove(key); } }
Began life as a copy of #1024464
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031558 |
| Snippet name: | syncMapPut2 |
| Eternal ID of this version: | #1031558/1 |
| Text MD5: | 5a47413971660fb727edeafa60b0b5a7 |
| Transpilation MD5: | 875df769bce7ffb65bd6b6bbf074f793 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-22 00:36:31 |
| Source code size: | 215 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 384 / 533 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1032016 - syncMapGetOrPut |