T - a subclass of Numberpublic static interface NumberUtils.Comparable<T extends java.lang.Number>
Number must implement this interface to work with NumberUtils.compare(java.lang.Number, java.lang.Number, double).| Modifier and Type | Method and Description |
|---|---|
int |
compare(java.lang.Number that,
double epsilon)
Compare
this and that numbers up to a precision. |
int compare(java.lang.Number that,
double epsilon)
this and that numbers up to a precision.that - a Number.
As a number can be represented in multiple ways, e.g., 0 = 0 + 0i, the implementation may need to check Object type.epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0this is bigger; -1 if that is bigger