MCPcopy
hub / github.com/google/guava / sortedCopy

Method sortedCopy

guava/src/com/google/common/collect/Ordering.java:860–865  ·  view source on GitHub ↗
(Iterable<E> elements)

Source from the content-addressed store, hash-verified

858 */
859 // TODO(kevinb): rerun benchmarks including new options
860 public <E extends T> List<E> sortedCopy(Iterable<E> elements) {
861 @SuppressWarnings("unchecked") // does not escape, and contains only E's
862 E[] array = (E[]) Iterables.toArray(elements);
863 sort(array, this);
864 return new ArrayList<>(asList(array));
865 }
866
867 /**
868 * Returns an <b>immutable</b> list containing {@code elements} sorted by this ordering. The input

Callers 15

orderingMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
orderMethod · 0.45
verifyMergeSortedMethod · 0.45

Calls 3

toArrayMethod · 0.95
sortMethod · 0.45
asListMethod · 0.45

Tested by 15

orderingMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
orderMethod · 0.36
verifyMergeSortedMethod · 0.36
orderMethod · 0.36