public class NameTimestampComparator extends Object implements Comparator<Column>
| Constructor and Description |
|---|
NameTimestampComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Column c1,
Column c2)
比较两个属性列的名称和时间戳。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(Column c1, Column c2)
拿此比较器排序后的结果为先按名称升序,后按时间戳降序。
若比较的两个Column没有设置过时间戳,则无法进行比较。
compare in interface Comparator<Column>c1 - c2 - Copyright © 2024. All Rights Reserved.