T
- 被比较的Beanpublic class PropertyComparator<T> extends FuncComparator<T>
comparator, nullGreater
Constructor and Description |
---|
PropertyComparator(String property)
构造
|
PropertyComparator(String property,
boolean isNullGreater)
构造
|
PropertyComparator(String property,
boolean compareSelf,
boolean isNullGreater)
构造
|
compare, doCompare, thenComparing
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public PropertyComparator(String property)
property
- 属性名public PropertyComparator(String property, boolean isNullGreater)
property
- 属性名isNullGreater
- null值是否排在后(从小到大排序)public PropertyComparator(String property, boolean compareSelf, boolean isNullGreater)
property
- 属性名compareSelf
- 在字段值相同情况下,是否比较对象本身。
如果此项为false
,字段值比较后为0会导致对象被认为相同,可能导致被去重。isNullGreater
- null值是否排在后(从小到大排序)Copyright © 2024. All rights reserved.