code: public Range<T> intersectionWith(final Range<T> other) {
          if (!this.isOverlappedBy(other)) {
              throw new IllegalArgumentException(StringUtils.simpleFormat(
                  "Cannot calculate intersection with non-overlapping range %s", other));
          }
          if (this.equals(other)) {
              return this;
          }
          final T min = getComparator().compare(minimum, other.minimum) < 0 ? other.minimum : minimum;
          final T max = getComparator().compare(maximum, other.maximum) < 0 ? maximum : other.maximum;
          return between(min, max, getComparator());
      }
docs: Calculate the intersection of {@code this} and an overlapping Range.
  @param other overlapping Range
  @return range representing the intersection of {@code this} and {@code other} ({@code this} if equal)
  @throws IllegalArgumentException if {@code other} does not overlap {@code this}
  @since 3.0.1