Libraryless. Click here for Pure Java version (10056L/55K).
1 | static TimestampRange joinTimestampRanges(TimestampRange a, TimestampRange b) { |
2 | if (a == null) ret b; |
3 | if (b == null) ret a; |
4 | ret TimestampRange(min(a.start, b.start), max(a.end, b.end)); |
5 | } |
6 | |
7 | static TimestampRange joinTimestampRanges(Iterable<TimestampRange> l) { |
8 | ret fold joinTimestampRanges(l); |
9 | } |
Began life as a copy of #1033296
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1036493 |
Snippet name: | joinTimestampRanges |
Eternal ID of this version: | #1036493/6 |
Text MD5: | d808500d3bd618835cb49e380687edb3 |
Transpilation MD5: | fd6dada4e06cbb2acc57b3093f947dcc |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-12-20 22:14:36 |
Source code size: | 311 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 151 / 229 |
Version history: | 5 change(s) |
Referenced in: | [show references] |