Constructor and Description |
---|
NumUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(int inValue1,
int inValue2)
Compares the absolute value of two ints.
|
static int |
compareAbs(int inValue1,
int inValue2)
Compares the absolute value of two ints.
|
static <N extends Number> |
max(N inValue1,
N inValue2)
A null-safe version of max() function in Integer, Float, Double, etc.
|
static <N extends Number> |
min(N inValue1,
N inValue2)
A null-safe version of min() function in Integer, Float, Double, etc.
|
static double |
sum(List<? extends Number> inValues) |
public NumUtil()
public static int compare(int inValue1, int inValue2)
public static int compareAbs(int inValue1, int inValue2)
public static <N extends Number> N min(N inValue1, N inValue2)
N
- the type of Number objectinValue1
- first numberinValue2
- second number