public final class Comparators extends Object
| 构造器和说明 |
|---|
Comparators() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Comparable<? super T>> |
asc() |
static int |
compare(Object a,
Object b)
Compare two object numerically
|
static <T extends Comparable<? super T>> |
compareNullsFirst(T a,
T b) |
static <T extends Comparable<? super T>> |
desc() |
static <T extends Comparable<? super T>> |
order(boolean asc) |
public static final int EQ
public static final int GT
public static final int LT
public static <T extends Comparable<? super T>> Comparator<T> asc()
public static <T extends Comparable<? super T>> Comparator<T> desc()
public static <T extends Comparable<? super T>> Comparator<T> order(boolean asc)
public static int compare(Object a, Object b)
a - the object ab - the object bpublic static <T extends Comparable<? super T>> int compareNullsFirst(T a, T b)
Copyright © 2025. All rights reserved.