public class StrLengthComparator extends Object implements Comparator<CharSequence>
| Modifier and Type | Field and Description |
|---|---|
static StrLengthComparator |
INSTANCE
单例的字符串长度比较器,短在前
|
| Constructor and Description |
|---|
StrLengthComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(CharSequence o1,
CharSequence o2) |
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 static final StrLengthComparator INSTANCE
public int compare(CharSequence o1, CharSequence o2)
compare in interface Comparator<CharSequence>Copyright © 2025. All rights reserved.