code: public Range<T> intersect(Range<T> range) {
          if (range == null)
              throw new IllegalArgumentException("range must not be null");
  
          int cmpLower = range.mLower.compareTo(mLower);
          int cmpUpper = range.mUpper.compareTo(mUpper);
  
          if (cmpLower <= 0 && cmpUpper >= 0) {
              // range includes this
              return this;
          } else if (cmpLower >= 0 && cmpUpper <= 0) {
              // this inludes range
              return range;
          } else {
              return Range.create(
                      cmpLower <= 0 ? mLower : range.mLower,
                      cmpUpper >= 0 ? mUpper : range.mUpper);
          }
      }
docs: Returns the intersection of this range and another {@code range}.
  <p>
  E.g. if a {@code <} b {@code <} c {@code <} d, the
  intersection of [a, c] and [b, d] ranges is [b, c].
  As the endpoints are object references, there is no guarantee
  which specific endpoint reference is used from the input ranges:</p>
  <p>
  E.g. if a {@code ==} a' {@code <} b {@code <} c, the
  intersection of [a, b] and [a', c] ranges could be either
  [a, b] or ['a, b], where [a, b] could be either the exact
  input range, or a newly created range with the same endpoints.</p>
  
  @param range a non-{@code null} {@code Range<T>} reference
  @return the intersection of this range and the other range.
  @throws NullPointerException     if {@code range} was {@code null}
  @throws IllegalArgumentException if the ranges are disjoint.