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

13
LINES

< > BotCompany Repo | #1011096 // litciset - make case-insensitive set

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

Libraryless. Click here for Pure Java version (115L/1K/4K).

1  
static TreeSet<S> litciset(S... items) {
2  
  TreeSet<S> set = caseInsensitiveSet();
3  
  for (S a : items) set.add(a);
4  
  ret set;
5  
}
6  
7  
ifclass Symbol
8  
static TreeSet<Symbol> litciset(Symbol... items) {
9  
  TreeSet<Symbol> set = treeSet(); // HashSet would also do, but we might have the return type fixed somewhere, and they might want a NavigableMap.
10  
  for (Symbol a : items) set.add(a);
11  
  ret set;
12  
}
13  
endif

Author comment

Began life as a copy of #1003051

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1011096
Snippet name: litciset - make case-insensitive set
Eternal ID of this version: #1011096/9
Text MD5: 8965a90a667259e2f1337ec1e724594c
Transpilation MD5: 704a47540ddabafa4ec116ff06b0e391
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-03 18:13:11
Source code size: 409 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 564 / 643
Version history: 8 change(s)
Referenced in: [show references]