public boolean intersectsWithOrTouches(Range other) {
        return contains(other.lower) || contains(other.upper - 1) || (other.upper > upper && other.lower < lower) ||
                other.lower == upper || other.upper == lower;
    }
public boolean intersectsWithOrTouches ( Range other ) { return contains ( other . lower ) || contains ( other . upper - 1 ) || ( other . upper > upper && other . lower < lower ) || other . lower == upper || other . upper == lower ; }
Returns {@code true} if range intersects with or touches {@code other} range.

@param other other range
@return {@code true} if range intersects with or touches {@code other} range