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

4
LINES

< > BotCompany Repo | #1024789 // findListInsertionPoint

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

Libraryless. Click here for Pure Java version (1653L/11K).

1  
static <A> int findListInsertionPoint(O comparator, L<A> l, A a) {
2  
  int i = Collections.binarySearch(l, a, makeComparator(comparator));
3  
  ret i >= 0 ? i : -i-1;
4  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024789
Snippet name: findListInsertionPoint
Eternal ID of this version: #1024789/2
Text MD5: 95f5f6fbd05bd1526fb386500202b922
Transpilation MD5: 6e77c35cf6a01a8ce159823c33a0bf04
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-25 19:10:42
Source code size: 166 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 222 / 312
Version history: 1 change(s)
Referenced in: [show references]