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

8
LINES

< > BotCompany Repo | #1009544 - setIntersection

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

Libraryless. Click here for Pure Java version (2511L/16K).

static <A> Set<A> setIntersection(Cl<A> a, Cl<A> b) {
  Set<A> set = similarEmptySet(a);
  if (nempty(a) && nempty(b)) {
    Set<A> bSet = asSet(b);
    for (A x : a) if (bSet.contains(x)) set.add(x);
  }
  ret set;
}

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: #1009544
Snippet name: setIntersection
Eternal ID of this version: #1009544/6
Text MD5: 9c4f2ff220cb6ffcd49664c8eec91381
Transpilation MD5: 6058ea57672f59e6d2caae65a993e48d
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-17 17:13:15
Source code size: 224 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 350 / 402
Version history: 5 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009544 & http://1009544.tinybrain.de