boolean (@NotNull LongRangeSet other) { if (other instanceof ModRange modRange) { if (modRange.myFrom < myFrom || modRange.myTo > myTo) return false; int lcm = lcm(modRange.myMod); if (lcm <= Long.SIZE) { return (~widenBits(lcm) & modRange.widenBits(lcm)) == 0; } } long[] ranges = other.asRangeArray(); for (int i = 0; i < ranges.length; i += 2) { if (!contains(ranges[i], ranges[i + 1])) return false; } return true; }