Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
* @see ColumnIndexFilter#calculateRowRanges(Filter, ColumnIndexStore, Set, long)
*/
public class RowRanges {
private static class Range {
// Make it public because some uppler layer application need to access it
public static class Range {

// Returns the union of the two ranges or null if there are elements between them.
private static Range union(Range left, Range right) {
Expand All @@ -63,8 +64,8 @@ private static Range intersection(Range left, Range right) {
return null;
}

final long from;
final long to;
public final long from;
public final long to;

// Creates a range of [from, to] (from and to are inclusive; empty ranges are not valid)
Range(long from, long to) {
Expand Down Expand Up @@ -299,6 +300,10 @@ public boolean isOverlapping(long from, long to) {
(r1, r2) -> r1.isBefore(r2) ? -1 : r1.isAfter(r2) ? 1 : 0) >= 0;
}

public List<Range> getRanges() {
return Collections.unmodifiableList(ranges);
}

@Override
public String toString() {
return ranges.toString();
Expand Down