1 | static <A, B> void putIfNotThere(Map<A, B> map, A key, B value) {
|
2 | if (map != null && key != null && value != null && !map.containsKey(key)) |
3 | map.put(key, value); |
4 | } |
Began life as a copy of #1007227
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1008400 |
| Snippet name: | putIfNotThere - mapPut if key not there |
| Eternal ID of this version: | #1008400/1 |
| Text MD5: | 0fe7f4655effbac608d2b11a049cdefa |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-05-11 02:49:16 |
| Source code size: | 171 bytes / 4 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 773 / 778 |
| Referenced in: | [show references] |