T
- a subclass of Number
public static interface NumberUtils.Comparable<T extends 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(Number that,
double epsilon)
Compare
this and that numbers up to a precision. |
int compare(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 biggerCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.