android/guava/src/com/google/common/collect/TreeRangeSet.java
public static <C extends Comparable<?>> TreeRangeSet<C> create(Iterable<Range<C>> ranges) {
    TreeRangeSet<C> result = create();
    result.addAll(ranges);
    return result;
  }
public static <C extends Comparable<?>> TreeRangeSet<C> create(Iterable<Range<C>> ranges) {
    TreeRangeSet<C> result = create();
    result.addAll(ranges);
    return result;
  }
Returns a {@code TreeRangeSet} representing the union of the specified ranges.

<p>This is the smallest {@code RangeSet} which encloses each of the specified ranges. An
element will be contained in this {@code RangeSet} if and only if it is contained in at least
one {@code Range} in {@code ranges}.

@since 21.0