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

6
LINES

< > BotCompany Repo | #1028591 // joinLongRanges

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

Libraryless. Click here for Pure Java version (2578L/16K).

1  
static LongRange joinLongRanges(Iterable<LongRange> l) {
2  
  LongRange r = null;
3  
  fOr (LongRange x : l)
4  
    r = r == null ? x : LongRange(min(r.start, x.start), max(r.end, x.end));
5  
  ret r;
6  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028591
Snippet name: joinLongRanges
Eternal ID of this version: #1028591/2
Text MD5: a6863594f2125e06e76f4a0925f55ea4
Transpilation MD5: b89e6c4a90ceedbf6eb62406d2655555
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-27 23:30:13
Source code size: 195 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 230 / 315
Version history: 1 change(s)
Referenced in: [show references]