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

17
LINES

< > BotCompany Repo | #1003400 // sorted - takes a Collection<A> and an optional func(A, A) -> int

JavaX fragment (include)

1  
static <A> L<A> sorted(Collection<A> c, O comparator) {
2  
  L<A> l = cloneList(c);
3  
  sort(l, makeComparator(comparator));
4  
  ret l;
5  
}
6  
7  
static <A> L<A> sorted(Collection<A> c) {
8  
  L<A> l = cloneList(c);
9  
  sort(l);
10  
  ret l;
11  
}
12  
13  
static <A> L<A> sorted(Comparator<A> comparator, Collection<A> c) {
14  
  L<A> l = cloneList(c);
15  
  sort(l, comparator);
16  
  ret l;
17  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003400
Snippet name: sorted - takes a Collection<A> and an optional func(A, A) -> int
Eternal ID of this version: #1003400/3
Text MD5: 5126fc758edfdab1ba8e472cac33f5fc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-17 06:35:49
Source code size: 364 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 697 / 1048
Version history: 2 change(s)
Referenced in: [show references]