|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.utils.ParsingUtils
public final class ParsingUtils
Utility to parse various inputs
Method Summary | |
---|---|
static double |
parseNumber(String number)
Parses a string with the default locale and returns the corresponding number |
static double |
parseNumber(String number,
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double parseNumber(String number, Locale locale) throws ParseException
ParseException
- if number cannot be parsedpublic static double parseNumber(String number) throws ParseException
ParseException
- if number cannot be parsedpublic static double scaleValue(double value)
public static double scaleValue(double value, int decimals)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |