/guava/guava/src/com/google/common/collect/ImmutableSortedSet.java
if ( comparator.compare( cur, prev) >= 0) {
if ( comparator.compare ( cur, prev ) != 0 ) {
checkElementsNotNull(contents, n); Arrays.sort(contents, 0, n, comparator); int uniques = 1; for (int i = 1; i < n; i++) { E cur = contents[i]; E prev = contents[uniques - 1]; <extra_id_0> contents[uniques++] = cur; } } Arrays.fill(contents, uniques, n, null); return new RegularImmutableSortedSet<E>( ImmutableList.<E>asImmutableList(contents, uniques), comparator);