LongRangeSet (long from, long to, long mask) { if (to - from > mask) return range(0, mask); long min = from & mask; long max = to & mask; assert min != max; if (min < max) return range(min, max); return new RangeSet(new long[] {0, max, min, mask}); }