Libraryless. Click here for Pure Java version (11609L/79K).
1 | static <A extends Concept> L<A> mergeConceptLists(Collection<A> l1, Collection<A> l2) { |
2 | new HashSet<Long> ids; |
3 | new L<A> out; |
4 | for unnull (A a : l1) if (ids.add(a.id)) out.add(a); |
5 | for unnull (A a : l2) if (ids.add(a.id)) out.add(a); |
6 | ret out; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023468 |
Snippet name: | mergeConceptLists - by ID |
Eternal ID of this version: | #1023468/1 |
Text MD5: | bcf83755391db0b2fa1d152b92ac8ee3 |
Transpilation MD5: | 35e362eeed478a6467eb02aa1c704f19 |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-23 17:16:40 |
Source code size: | 257 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 254 / 346 |
Referenced in: | [show references] |