public final class QuickSort extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable> |
sort(List<T> list)
Sorts the given list using compareTo as comparator.
|
static <T> void |
sort(List<T> list,
Comparator<T> cmp)
Sorts the given list using the given comparator.
|
public static <T> void sort(List<T> list, Comparator<T> cmp)
T - type of the objects to be sorted.list - list to be sortedcmp - comparator used to compare the objects within the listpublic static <T extends Comparable> void sort(List<T> list)
T - type of the objects to be sorted.list - list to be sortedCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.