/guava/guava/src/com/google/common/collect/ImmutableSortedMultiset.java
TreeMultiset<E> sortedCopy = TreeMultiset.create( checkNotNull( comparator) ) ; elements = Lists.newArrayList( elements) ;
elements = Lists.newArrayList ( elements ) ; TreeMultiset<E> sortedCopy = TreeMultiset.create ( checkNotNull ( comparator ) ) ;
return copyOfSortedEntries(comparator, multiset.entrySet().asList()); } else { return multiset; } } } <extra_id_0> Iterables.addAll(sortedCopy, elements); return copyOfSortedEntries(comparator, sortedCopy.entrySet()); } public static <E> ImmutableSortedMultiset<E> copyOfSorted(SortedMultiset<E> sortedMultiset) { return copyOfSortedEntries( sortedMultiset.comparator(), Lists.newArrayList(sortedMultiset.entrySet()));