Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1011121 // containsNotNull - like contains(), but returns false if element is null

JavaX fragment (include)

1  
static bool containsNotNull(Collection c, O o) {
2  
  ret o != null && contains(c, o);
3  
}
4  
5  
static bool containsNotNull(O[] x, O o) {
6  
  ret o != null && contains(x, o);
7  
}

Author comment

Began life as a copy of #1002990

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: #1011121
Snippet name: containsNotNull - like contains(), but returns false if element is null
Eternal ID of this version: #1011121/1
Text MD5: 6d8f782ba6cea9982efa875b62df44f9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-15 17:09:44
Source code size: 171 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 499 / 526
Referenced in: [show references]