public class ScientificNumberStringComparator extends Object implements Comparator<CharSequence>
Double
floating point numbers. This
allows floating point numbers to be specified in scientific notation,
like 1.0e-34 and 10e100 using Double.parseDouble(String)
. Leading
and trailing strings are ignored. If the string is not a valid number, it is
treated as Double.NaN
during the comparison.Modifier and Type | Field and Description |
---|---|
static ScientificNumberStringComparator |
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(CharSequence s1,
CharSequence s2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public static final ScientificNumberStringComparator INSTANCE
public int compare(CharSequence s1, CharSequence s2)
compare
in interface Comparator<CharSequence>
Copyright © 2016. All rights reserved.