code: @Override
    public ImmutableRangeSet<C> subRangeSet(Range<C> range) {
      if (!isEmpty()) {
        Range<C> span = span();
        if (range.encloses(span)) {
          return this;
        } else if (range.isConnected(span)) {
          return new ImmutableRangeSet<C>(intersectRanges(range));
        }
      }
      return of();
    }
docs: Returns a view of the intersection of this range set with the given range.