public class NumericStringComparator<T> extends Object implements Comparator<T>, Serializable
| Constructor and Description |
|---|
NumericStringComparator(Locale locale) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T c1,
T c2)
Compare between two objects, sort by their value
|
protected boolean |
containsOnly(char[] chrs,
char ch) |
protected boolean |
containsOnly(String str,
char ch) |
protected int |
countZeroes(String str) |
protected int |
getFirstDigitIndex(char[] chrs,
int start) |
protected int |
getFirstDigitIndex(String str) |
protected int |
getFirstDigitIndex(String str,
int start) |
protected int |
getLastDigitIndex(char[] chrs,
int start) |
protected int |
getLastDigitIndex(String str,
int start) |
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 NumericStringComparator(Locale locale)
public int compare(T c1, T c2) throws ClassCastException
compare in interface Comparator<T>c1 - c2 - ClassCastExceptionprotected int getFirstDigitIndex(String str)
protected int getFirstDigitIndex(String str, int start)
protected int getFirstDigitIndex(char[] chrs,
int start)
protected int getLastDigitIndex(String str, int start)
protected int getLastDigitIndex(char[] chrs,
int start)
protected int countZeroes(String str)
protected boolean containsOnly(String str, char ch)
protected boolean containsOnly(char[] chrs,
char ch)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.