public final class NumberUtils
extends java.lang.Object
A utility class for Number
s.
Modifier and Type | Method and Description |
---|---|
static int |
compare(java.lang.Number x,
java.lang.Number y)
Compare two numbers.
|
public static int compare(java.lang.Number x, java.lang.Number y)
Compare two numbers.
x
- first number.y
- second number.0
if x
and y
are numerically equal. A value less
than 0
if x
is numerically less than y
. A value greater
than 0
if x
is numerically greater than y
.