1 | static HashSet collectUnique(Collection c, S field) { |
2 | new HashSet set; |
3 | for (O a : c) { |
4 | O val = getOpt(a, field); |
5 | if (val != null) |
6 | set.add(val); |
7 | } |
8 | ret set; |
9 | } |
10 | |
11 | static HashSet mapMethodLike collectUnique(S field, Collection c) { |
12 | ret collectUnique(c, field); |
13 | } |
Began life as a copy of #1002504
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005062 |
Snippet name: | collectUnique |
Eternal ID of this version: | #1005062/2 |
Text MD5: | 98fde9ca6e26f9cbc5c4a5c5f9d30f35 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-17 00:12:33 |
Source code size: | 292 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 544 / 570 |
Version history: | 1 change(s) |
Referenced in: | [show references] |