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

7
LINES

< > BotCompany Repo | #1028056 // asOrderedSet

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

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

static <A> Set<A> asOrderedSet(Iterable<A> l) {
  if (l cast LinkedHashSet) ret l;
  new LinkedHashSet<A> set;
  for (A o : unnull(l))
    set.add(o);
  ret set;
}

Author comment

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: 185 / 254
Referenced in: [show references]