static <A, B> void putIfNotThere(Map<A, B> map, A key, B value) { if (map != null && key != null && value != null && !map.containsKey(key)) map.put(key, value); }
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: | 547 / 536 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1011325 - putIfNotExisting - synonym of putIfNotThere - mapPut if key not there #1019137 - syncPutIfNotThere - mapPut if key not there #1028101 - putIfHigherByCalculatedField |