public static <T extends Comparable<T>> RangeSet<T> unionRanges(final Iterable<Range<T>> ranges)
  {
    RangeSet<T> rangeSet = null;
    for (Range<T> range : ranges) {
      if (rangeSet == null) {
        rangeSet = TreeRangeSet.create();
      }
      rangeSet.add(range);
    }
    return rangeSet;
  }
public static < T extends Comparable < T > > RangeSet < T > unionRanges ( final Iterable < Range < T > > ranges ) { RangeSet < T > rangeSet = null ; for ( Range < T > range : ranges ) { if ( rangeSet == null ) { rangeSet = TreeRangeSet . create ( ) ; } rangeSet . add ( range ) ; } return rangeSet ; }
Unions a set of ranges, or returns null if the set is empty.