Libraryless. Click here for Pure Java version (2792L/16K).
1 | static <A, B> void syncMapPut2(Map<A, B> map, A key, B value) {
|
2 | if (map != null && key != null) synchronized(collectionMutex(map)) {
|
3 | if (value != null) map.put(key, value); |
4 | else map.remove(key); |
5 | } |
6 | } |
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: | 383 / 533 |
| Referenced in: | [show references] |