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

5
LINES

< > BotCompany Repo | #1026608 // listAndSetIntersect

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2200L/14K).

1  
static <A> bool listAndSetIntersect(Iterable<A> a, Collection<A> b) {
2  
  Set<A> bSet = asSet(b);
3  
  for (A x : unnull(a)) if (bSet.contains(x)) true;
4  
  false;
5  
}

Author comment

Began life as a copy of #1014365

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026608
Snippet name: listAndSetIntersect
Eternal ID of this version: #1026608/1
Text MD5: 3cf48c9bdffcb0972828f22da4c5ed68
Transpilation MD5: 4478e6279002d89b554d30fbf6cc2871
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-16 15:03:14
Source code size: 162 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 231 / 327
Referenced in: [show references]