public class LengthComparator extends Object implements Comparator<CharSequence>
Modifier and Type | Field and Description |
---|---|
static LengthComparator |
INSTANCE
单例的字符串长度比较器,短在前
|
Constructor and Description |
---|
LengthComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(CharSequence o1,
CharSequence o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final LengthComparator INSTANCE
public int compare(CharSequence o1, CharSequence o2)
compare
in interface Comparator<CharSequence>
Copyright © 2024. All rights reserved.