Package org.miaixz.bus.core.compare
Class FieldsCompare<T>
java.lang.Object
org.miaixz.bus.core.compare.NullCompare<T>
org.miaixz.bus.core.compare.FieldsCompare<T>
- Type Parameters:
T- 被比较的Bean
- All Implemented Interfaces:
Serializable,Comparator<T>
Bean字段排序器
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields inherited from class org.miaixz.bus.core.compare.NullCompare
comparator, nullGreater -
Constructor Summary
ConstructorsConstructorDescriptionFieldsCompare(boolean nullGreater, Class<T> beanClass, String... fieldNames) 构造FieldsCompare(Class<T> beanClass, String... fieldNames) 构造 -
Method Summary
Methods inherited from class org.miaixz.bus.core.compare.NullCompare
compare, doCompare, thenComparingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
FieldsCompare
构造- Parameters:
beanClass- Bean类fieldNames- 多个字段名
-
FieldsCompare
构造- Parameters:
nullGreater- 是否null在后beanClass- Bean类fieldNames- 多个字段名
-