1 | static <A> L<A> uniquifyList_identity(Collection<A> l) {
|
2 | if (l == null) null; |
3 | if (l(l) < 2) ret asList(l); |
4 | Set<A> set = identityHashSet(); |
5 | new L<A> out; |
6 | for (A a : l) |
7 | if (set.add(a)) |
8 | out.add(a); |
9 | ret out; |
10 | } |
Began life as a copy of #1006315
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017808 |
| Snippet name: | uniquifyList_identity - keep order & remove duplicates - uses == |
| Eternal ID of this version: | #1017808/1 |
| Text MD5: | 4ac14757d6ea0b528bbcb72b917345e7 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-08-14 11:58:19 |
| Source code size: | 236 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 533 / 585 |
| Referenced in: | [show references] |