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

9
LINES

< > BotCompany Repo | #1036503 // sortedByIC - better synonym of sortByCalculatedFieldIC

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

Libraryless. Click here for Pure Java version (9993L/55K).

1  
static <A> L<A> sortedByIC(Iterable<A> c, IF1<A, S> f) {
2  
  L<A> l = cloneList(c);
3  
  sort(l, (a, b) -> compareIC(f.get(a), f.get(b)));
4  
  ret l;
5  
}
6  
7  
static <A> L<A> lambdaMapLike sortedByIC(IF1<A, S> f, Iterable<A> c) {
8  
  ret sortedByIC(c, f);
9  
}

Author comment

Began life as a copy of #1016503

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036503
Snippet name: sortedByIC - better synonym of sortByCalculatedFieldIC
Eternal ID of this version: #1036503/4
Text MD5: fedb527683f8c595f58170ec16bcb6f3
Transpilation MD5: 52aed4fdf70212b8b11a0c87824dba55
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-01-07 20:50:19
Source code size: 250 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 148 / 205
Version history: 3 change(s)
Referenced in: [show references]