T - 被比较的对象public class FuncCompare<T> extends NullCompare<T>
comparator, nullGreater| Constructor and Description |
|---|
FuncCompare(boolean nullGreater,
Function<T,Comparable<?>> func)
构造
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
doCompare(T a,
T b)
不检查
null的比较方法
用户可自行重写此方法自定义比较方式 |
compare, reversed, thenComparingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reverseOrder, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic FuncCompare(boolean nullGreater,
Function<T,Comparable<?>> func)
nullGreater - 是否null在后func - 比较项获取函数protected int doCompare(T a, T b)
NullComparenull的比较方法
用户可自行重写此方法自定义比较方式doCompare in class NullCompare<T>a - A值b - B值Copyright © 2021. All rights reserved.