public class NumUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(double val1,
double val2)
Compares two double values.
|
static int |
compare(int val1,
int val2)
Compares two integer values.
|
static int |
enforceRange(int value,
int minValue,
int maxValue)
Force an integer value to be within a specified range.
|
static String |
toString(double value)
Converts a double to a string without the trailing fractional zero.
|
public static int compare(int val1,
int val2)
val1 - First value.val2 - Second value.public static int compare(double val1,
double val2)
val1 - First value.val2 - Second value.public static int enforceRange(int value,
int minValue,
int maxValue)
value - Value to checkminValue - Minimum allowable valuemaxValue - Maximum allowable valuepublic static String toString(double value)
value - Double value.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.