public class SortUtils extends Object
| Constructor and Description |
|---|
SortUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <S> boolean |
allEqual(List<S> a,
Comparator<S> comparator) |
static <S> void |
exchange(List<S> a,
int i,
int j) |
static <S> boolean |
isSortedAsc(List<S> a,
Comparator<S> comparator) |
static <S> boolean |
isSortedDesc(List<S> a,
Comparator<S> comparator) |
static <S> boolean |
less(S a1,
S a2,
Comparator<S> comparator) |
static void |
print(List<Integer> a) |
public static <S> boolean less(S a1,
S a2,
Comparator<S> comparator)
public static <S> void exchange(List<S> a, int i, int j)
public static <S> boolean isSortedAsc(List<S> a, Comparator<S> comparator)
public static <S> boolean isSortedDesc(List<S> a, Comparator<S> comparator)
public static <S> boolean allEqual(List<S> a, Comparator<S> comparator)
Copyright © 2017. All rights reserved.