public class NumberUtilities extends Object
NumberUtilities
provides methods for number handling.
Constructor and Description |
---|
NumberUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isInteger(String string)
Check whether an string is an integer.
|
static boolean |
isNonNegativeInteger(String string)
Check whether an string is a non-negative integer.
|
static boolean |
isNumber(String string)
Check whether a string is a number
|
static double |
scaleDouble(double value,
int decimalPlaces)
Returns the value scaled to the indicated decimal places
|
public static boolean isNumber(String string)
string
- string to checkpublic static boolean isInteger(String string)
string
- input stringpublic static boolean isNonNegativeInteger(String string)
string
- input stringpublic static double scaleDouble(double value, int decimalPlaces)
value
- the value to scaledecimalPlaces
- the number of decimal placesCopyright © 2015 European Bioinformatics Institute. All Rights Reserved.