title: Create Guava ImmutableRangeSet from overlapping ranges
body: <p>Apparently Guava's <a href="https://google.github.io/guava/releases/21.0/api/docs/com/google/common/collect/ImmutableRangeSet.html" rel="nofollow noreferrer"><code>ImmutableRangeSet</code></a> cannot store overlapping ranges. This makes sense, but is there an interface to resolve/merge overlapping ranges and then put the resultant ranges into an <code>ImmutableRangeSet</code>?</p>
  
  <p>Currently I'm building a <a href="https://google.github.io/guava/releases/22.0/api/docs/com/google/common/collect/TreeRangeSet.html" rel="nofollow noreferrer"><code>TreeRangeSet</code></a>, which automatically merges overlapping ranges, and passing this as an argument to <code>ImmutableRangeSet.builder().addAll()</code>. This process works, but it seems a little too indirect just to resolve overlapping ranges.</p>