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


< > BotCompany Repo | #1014365 - listSetIntersection

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

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

static <A> L<A> listSetIntersection(Iterable<A> a, Collection<A> b) {
  new L<A> l;
  Set<A> bSet = asSet(b);
  for (A x : unnull(a)) if (bSet.contains(x)) l.add(x);
  ret l;

Author comment

Began life as a copy of #1009544

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1014365
Snippet name: listSetIntersection
Eternal ID of this version: #1014365/2
Text MD5: fdcf189b4e760dbfcb20e20ecd769a1d
Transpilation MD5: 58efe4a673e0b64b875bd402e8d60c48
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:02:36
Source code size: 181 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 207
Version history: 1 change(s)
Referenced in: [show references]

Formerly at &