public class AlphaNumericComparator extends Object implements Comparator<CharSequence>
| Constructor and Description |
|---|
AlphaNumericComparator()
Creates a comparator that will use lexicographical sorting of the non-numerical parts of the
compared strings.
|
AlphaNumericComparator(Collator collator)
Creates a comparator that will use the given collator to sort the non-numerical parts of the
compared strings.
|
AlphaNumericComparator(Locale locale)
Creates a comparator that will use locale-sensitive sorting of the non-numerical parts of the
compared strings.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(CharSequence s1,
CharSequence s2) |
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 AlphaNumericComparator()
public AlphaNumericComparator(Locale locale)
locale - the locale to usepublic AlphaNumericComparator(Collator collator)
collator - the collator to usepublic int compare(CharSequence s1, CharSequence s2)
compare in interface Comparator<CharSequence>Copyright © 2017. All rights reserved.