boolean (@NotNull LongRangeSet other) { if (other.isEmpty() || other == this) return true; if (other instanceof Point) { return contains(((Point)other).myValue); } LongRangeSet result = other; for (int i = 0; i < myRanges.length; i += 2) { result = result.subtract(range(myRanges[i], myRanges[i + 1])); if (result.isEmpty()) return true; } return false; }