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

5
LINES

< > BotCompany Repo | #1022532 // combineIntRanges

JavaX fragment (include)

1  
static IntRange combineIntRanges(IntRange a, IntRange b) {
2  
  if (a == null) ret b;
3  
  if (b == null) ret a;
4  
  ret intRange(min(a.start, b.start), max(a.end, b.end));
5  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022532
Snippet name: combineIntRanges
Eternal ID of this version: #1022532/1
Text MD5: 53faedd329a3e80c5ffe825efc912689
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-20 12:07:40
Source code size: 170 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 302 / 310
Referenced in: [show references]