Package org.openstreetmap.josm.tools
Class JosmDecimalFormatSymbolsProvider
- java.lang.Object
-
- java.util.spi.LocaleServiceProvider
-
- java.text.spi.DecimalFormatSymbolsProvider
-
- org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider
-
public class JosmDecimalFormatSymbolsProvider extends DecimalFormatSymbolsProvider
JOSM implementation of theDecimalFormatSymbols
class, consistent with ISO 80000-1. This class will only be used with Java 9 and later runtimes, as Java 8 implementation relies on Java Extension Mechanism only, while Java 9 supports application classpath. SeeLocaleServiceProvider
javadoc for more details.- Since:
- 12931
-
-
Constructor Summary
Constructors Constructor Description JosmDecimalFormatSymbolsProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale[]
getAvailableLocales()
DecimalFormatSymbols
getInstance(Locale locale)
static double
parseDouble(String s)
Returns a newdouble
initialized to the value represented by the specifiedString
, allowing both dot and comma decimal separators.-
Methods inherited from class java.util.spi.LocaleServiceProvider
isSupportedLocale
-
-
-
-
Constructor Detail
-
JosmDecimalFormatSymbolsProvider
public JosmDecimalFormatSymbolsProvider()
-
-
Method Detail
-
getInstance
public DecimalFormatSymbols getInstance(Locale locale)
- Specified by:
getInstance
in classDecimalFormatSymbolsProvider
-
getAvailableLocales
public Locale[] getAvailableLocales()
- Specified by:
getAvailableLocales
in classLocaleServiceProvider
-
parseDouble
public static double parseDouble(String s)
Returns a newdouble
initialized to the value represented by the specifiedString
, allowing both dot and comma decimal separators.- Parameters:
s
- the string to be parsed.- Returns:
- the
double
value represented by the string argument. - Throws:
NullPointerException
- if the string is nullNumberFormatException
- if the string does not contain a parsabledouble
.- Since:
- 13050
- See Also:
Double.parseDouble(String)
-
-