|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.spi.LocaleServiceProvider
java.text.spi.NumberFormatProvider
public abstract class NumberFormatProvider
A NumberFormatProvider
provides localized
instances of NumberFormat
.
Constructor Summary | |
---|---|
protected |
NumberFormatProvider()
Constructs a new NumberFormatProvider . |
Method Summary | |
---|---|
abstract NumberFormat |
getCurrencyInstance(Locale locale)
Returns a NumberFormat instance
for monetary values in the specified
Locale . |
abstract NumberFormat |
getIntegerInstance(Locale locale)
Returns a NumberFormat instance
for integers in the specified Locale . |
abstract NumberFormat |
getNumberInstance(Locale locale)
Returns a general-purpose NumberFormat
instance in the specified Locale . |
abstract NumberFormat |
getPercentInstance(Locale locale)
Returns a NumberFormat instance
for percentage values in the specified
Locale . |
Methods inherited from class java.util.spi.LocaleServiceProvider |
---|
getAvailableLocales |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected NumberFormatProvider()
NumberFormatProvider
.
Provided for implicit invocation by subclasses.
Method Detail |
---|
public abstract NumberFormat getCurrencyInstance(Locale locale)
NumberFormat
instance
for monetary values in the specified
Locale
.
locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
NumberFormat.getCurrencyInstance(java.util.Locale)
public abstract NumberFormat getIntegerInstance(Locale locale)
NumberFormat
instance
for integers in the specified Locale
.
The returned instance should be configured to round
floating point numbers to the nearest integer using
RoundingMode.HALF_EVEN
rounding,
and to parse only the integer part of a number.
locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
NumberFormat.getIntegerInstance(java.util.Locale)
,
RoundingMode.HALF_EVEN
,
NumberFormat.isParseIntegerOnly()
public abstract NumberFormat getNumberInstance(Locale locale)
NumberFormat
instance in the specified Locale
.
locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
NumberFormat.getNumberInstance(java.util.Locale)
public abstract NumberFormat getPercentInstance(Locale locale)
NumberFormat
instance
for percentage values in the specified
Locale
.
locale
- the desired locale.
NullPointerException
- if the locale is null.
IllegalArgumentException
- if the locale is not one
returned by
LocaleServiceProvider.getAvailableLocales()
NumberFormat.getPercentInstance(java.util.Locale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |