public final class ParsingUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static double |
parseNumber(java.lang.String number)
Parses a string with the default locale and returns the corresponding number
|
static double |
parseNumber(java.lang.String number,
java.util.Locale locale)
Parses a string with a locale and returns the corresponding number
|
static double |
scaleValue(double value)
Scales a double value, taking into account 2 decimals
|
static double |
scaleValue(double value,
int decimals)
Scales a double value with decimals
|
public static double parseNumber(java.lang.String number, java.util.Locale locale) throws java.text.ParseException
java.text.ParseException
- if number cannot be parsedpublic static double parseNumber(java.lang.String number) throws java.text.ParseException
java.text.ParseException
- if number cannot be parsedpublic static double scaleValue(double value)
public static double scaleValue(double value, int decimals)