static <A> bool addIfNotNull(Collection<A> l, A a) { ret a != null && l != null & l.add(a); } ifclass MultiSet static <A> void addIfNotNull(MultiSet<A> ms, A a) { if (a != null && ms != null) ms.add(a); } endif
Began life as a copy of #1004244
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1005547 |
| Snippet name: | addIfNotNull |
| Eternal ID of this version: | #1005547/4 |
| Text MD5: | f143448aa732024246f5f6b8020387f2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-06-14 18:26:31 |
| Source code size: | 223 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1129 / 1157 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1015350 - addUnlessNull - returns element #1017186 - addAndReturnIfNotNull #1026816 - addIfInstanceOf |