src/java/org/apache/cassandra/dht/AbstractBounds.java
/**
     * @return A copy of the given list of with all bounds unwrapped, sorted by bound.left and with overlapping bounds merged.
     * This method does not allow allow to mix Range and Bound in the input list.
     */
@return A copy of the given list of with all bounds unwrapped, sorted by bound.left and with overlapping bounds merged.
This method does not allow allow to mix Range and Bound in the input list.
@return A copy of the given list of with all bounds unwrapped sorted by bound . left and with overlapping bounds merged . This method does not allow allow to mix Range and Bound in the input list .
public static <T extends RingPosition> List<AbstractBounds<T>> normalize(Collection<? extends AbstractBounds<T>> bounds)
    {
        List<AbstractBounds<T>> output = new ArrayList<AbstractBounds<T>>();
        for (AbstractBounds<T> bound : bounds)
            output.addAll(bound.unwrap());
        Collections.sort(output, new Comparator<AbstractBounds<T>>()
        {
            public int compare(AbstractBounds<T> b1, AbstractBounds<T> b2)
            {
                return b1.left.compareTo(b2.left);
            }
        });
        return deoverlap(output);
    }
public static < T extends RingPosition > List < AbstractBounds < T > > normalize ( Collection < ? extends AbstractBounds < T > > bounds ) { List < AbstractBounds < T > > output = new ArrayList < AbstractBounds < T > > ( ) ; for ( AbstractBounds < T > bound : bounds ) output . addAll ( bound . unwrap ( ) ) ; Collections . sort ( output , new Comparator < AbstractBounds < T > > ( ) { public int compare ( AbstractBounds < T > b1 , AbstractBounds < T > b2 ) { return b1 . left . compareTo ( b2 . left ) ; } } ) ; return deoverlap ( output ) ; }
@return A copy of the given list of with all bounds unwrapped, sorted by bound.left and with overlapping bounds merged.
@return A copy of the given list of with all bounds unwrapped sorted by bound . left and with overlapping bounds merged .
// unwrap all // sort by left // deoverlap