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 java.text.spi.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 java.util.Locale[]
getAvailableLocales()
java.text.DecimalFormatSymbols
getInstance(java.util.Locale locale)
static double
parseDouble(java.lang.String s)
Returns a newdouble
initialized to the value represented by the specifiedString
, allowing both dot and comma decimal separators.
-
-
-
Constructor Detail
-
JosmDecimalFormatSymbolsProvider
public JosmDecimalFormatSymbolsProvider()
-
-
Method Detail
-
getInstance
public java.text.DecimalFormatSymbols getInstance(java.util.Locale locale)
- Specified by:
getInstance
in classjava.text.spi.DecimalFormatSymbolsProvider
-
getAvailableLocales
public java.util.Locale[] getAvailableLocales()
- Specified by:
getAvailableLocales
in classjava.util.spi.LocaleServiceProvider
-
parseDouble
public static double parseDouble(java.lang.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:
java.lang.NullPointerException
- if the string is nulljava.lang.NumberFormatException
- if the string does not contain a parsabledouble
.- Since:
- 13050
- See Also:
Double.parseDouble(String)
-
-