1 | static <A, B> bool mapPutIfChange(Map<A, B> map, A key, B value) { |
2 | if (map != null && key != null && value != null && neq(map.get(key), value)) { |
3 | map.put(key, value); |
4 | true; |
5 | } |
6 | false; |
7 | } |
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: | #1008061 |
Snippet name: | mapPutIfChange - put into map if key & value are not null & there is some change |
Eternal ID of this version: | #1008061/1 |
Text MD5: | 7529725137c3a9f8183c2cdf3c78ab1c |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-23 13:13:57 |
Source code size: | 203 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 482 / 510 |
Referenced in: | [show references] |