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

5
LINES

< > BotCompany Repo | #1022532 // combineIntRanges

JavaX fragment (include)

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

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: 197 / 227
Referenced in: [show references]