Libraryless. Click here for Pure Java version (2521L/16K).
1 | static <A> Set<A> asOrderedSet(Iterable<A> l) { |
2 | if (l cast LinkedHashSet) ret l; |
3 | new LinkedHashSet<A> set; |
4 | for (A o : unnull(l)) |
5 | set.add(o); |
6 | ret set; |
7 | } |
Began life as a copy of #1001899
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028056 |
Snippet name: | asOrderedSet |
Eternal ID of this version: | #1028056/1 |
Text MD5: | cca918fcd76aee40117c77ac1d1e3ea5 |
Transpilation MD5: | 598c768240edf1fefce1e1a2d885075e |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-05-14 16:00:52 |
Source code size: | 169 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 186 / 255 |
Referenced in: | [show references] |