public class IlvNumberFormatFactory extends Object
NumberFormat
objects for specified locales.Modifier and Type | Field and Description |
---|---|
static int |
CURRENCYSTYLE
Constant to specify currency style of format which uses currency symbol
to represent currency, for example: "$3.00".
|
static int |
INTEGERSTYLE
Constant to specify a integer number style format.
|
static int |
ISOCURRENCYSTYLE
Constant to specify currency style of format which uses currency
ISO code to represent currency, for example: "USD3.00".
|
static int |
NUMBERSTYLE
Constant to specify normal number style of format.
|
static int |
PERCENTSTYLE
Constant to specify a style of format to display percent.
|
static int |
PLURALCURRENCYSTYLE
Constant to specify currency style of format which uses currency
long name with plural format to represent currency, for example,
"3.00 US Dollars".
|
static int |
SCIENTIFICSTYLE
Constant to specify a style of format to display scientific number.
|
Modifier and Type | Method and Description |
---|---|
static NumberFormat |
createCurrencyInstance()
Returns a freshly created currency number formatter for the current locale.
|
static NumberFormat |
createCurrencyInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createCurrencyInstance(ULocale) instead. |
static NumberFormat |
createCurrencyInstance(ULocale locale)
Returns a freshly created currency decimal number formatter for the given
locale.
|
static NumberFormat |
createInstance()
Returns a freshly created default decimal number formatter for the current
locale.
|
static NumberFormat |
createInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createInstance(ULocale) instead. |
static DecimalFormat |
createInstance(String pattern)
Returns a freshly created decimal number formatter instance using the
specified pattern for the current locale.
|
static DecimalFormat |
createInstance(String pattern,
Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createInstance(String, ULocale) instead. |
static DecimalFormat |
createInstance(String pattern,
ULocale locale)
Returns a freshly created decimal number formatter instance using the
specified pattern for the given locale.
|
static NumberFormat |
createInstance(ULocale locale)
Returns a freshly created default decimal number formatter for the given
locale.
|
static NumberFormat |
createIntegerInstance()
Returns a freshly created integer decimal number formatter for the current
locale.
|
static NumberFormat |
createIntegerInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createIntegerInstance(ULocale) instead. |
static NumberFormat |
createIntegerInstance(ULocale locale)
Returns a freshly created integer decimal number formatter for the given
locale.
|
static NumberFormat |
createPercentInstance()
Returns a freshly created percentage number formatter for the current
locale.
|
static NumberFormat |
createPercentInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createPercentInstance(ULocale) instead. |
static NumberFormat |
createPercentInstance(ULocale locale)
Returns a freshly created percentage number formatter for the given locale.
|
static NumberFormat |
createScientificInstance()
Returns a freshly created scientific decimal number formatter for the
current locale.
|
static NumberFormat |
createScientificInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
createScientificInstance(ULocale) instead. |
static NumberFormat |
createScientificInstance(ULocale locale)
Returns a freshly created scientific decimal number formatter for the given
locale.
|
static NumberFormat |
getCurrencyInstance()
Returns a currency number formatter for the current locale.
|
static NumberFormat |
getCurrencyInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getCurrencyInstance(ULocale) instead. |
static NumberFormat |
getCurrencyInstance(ULocale locale)
Returns a currency decimal number formatter for the given locale.
|
static String |
getDefaultPattern(ULocale locale,
int choice)
Returns the default pattern if no specific pattern is given for the DecimalFormat.
|
static NumberFormat |
getInstance()
Returns a default decimal number formatter for the current locale.
|
static NumberFormat |
getInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getInstance(ULocale) instead. |
static DecimalFormat |
getInstance(String pattern)
Returns a decimal number formatter instance using the specified pattern
for the current locale.
|
static DecimalFormat |
getInstance(String pattern,
Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getInstance(String, ULocale) instead. |
static DecimalFormat |
getInstance(String pattern,
ULocale locale)
Returns a decimal number formatter instance using the specified pattern
for the given locale.
|
static NumberFormat |
getInstance(ULocale locale)
Returns a default decimal number formatter for the given locale.
|
static NumberFormat |
getIntegerInstance()
Returns an integer decimal number formatter for the current locale.
|
static NumberFormat |
getIntegerInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getIntegerInstance(ULocale) instead. |
static NumberFormat |
getIntegerInstance(ULocale locale)
Returns an integer decimal number formatter for the given locale.
|
static NumberFormat |
getPercentInstance()
Returns a percentage number formatter for the current locale.
|
static NumberFormat |
getPercentInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getPercentInstance(ULocale) instead. |
static NumberFormat |
getPercentInstance(ULocale locale)
Returns a percentage number formatter for the given locale.
|
static NumberFormat |
getScientificInstance()
Returns a scientific decimal number formatter for the current locale.
|
static NumberFormat |
getScientificInstance(Locale locale)
Deprecated.
This method ignores the
numbers specification in
the ULocale . Better use
getScientificInstance(ULocale) instead. |
static NumberFormat |
getScientificInstance(ULocale locale)
Returns a scientific decimal number formatter for the given locale.
|
public static final int NUMBERSTYLE
public static final int CURRENCYSTYLE
public static final int PERCENTSTYLE
public static final int SCIENTIFICSTYLE
public static final int INTEGERSTYLE
public static final int ISOCURRENCYSTYLE
public static final int PLURALCURRENCYSTYLE
public static NumberFormat getInstance()
Note: The returned instance is shared and must not be destructively modified.
createInstance()
@Deprecated public static NumberFormat getInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
getInstance(ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
createInstance(Locale)
public static NumberFormat getInstance(ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
createInstance(ULocale)
public static NumberFormat getIntegerInstance()
Note: The returned instance is shared and must not be destructively modified.
createIntegerInstance()
@Deprecated public static NumberFormat getIntegerInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
getIntegerInstance(ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
createIntegerInstance(Locale)
public static NumberFormat getIntegerInstance(ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
createIntegerInstance(ULocale)
public static NumberFormat getCurrencyInstance()
Note: The returned instance is shared and must not be destructively modified.
createCurrencyInstance()
@Deprecated public static NumberFormat getCurrencyInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
getCurrencyInstance(ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
createCurrencyInstance(Locale)
public static NumberFormat getCurrencyInstance(ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
createCurrencyInstance(ULocale)
public static NumberFormat getPercentInstance()
Note: The returned instance is shared and must not be destructively modified.
createPercentInstance()
@Deprecated public static NumberFormat getPercentInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
getPercentInstance(ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
createPercentInstance(Locale)
public static NumberFormat getPercentInstance(ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
createInstance(ULocale)
public static NumberFormat getScientificInstance()
Note: The returned instance is shared and must not be destructively modified.
createScientificInstance()
@Deprecated public static NumberFormat getScientificInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
getScientificInstance(ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
createScientificInstance(Locale)
public static NumberFormat getScientificInstance(ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
createScientificInstance(ULocale)
public static DecimalFormat getInstance(String pattern)
Note: The returned instance is shared and must not be destructively modified.
Note: This method ignores the number system specification in the current
locale, if it specifies a number system that is not based on decimal
digits. To fully obey the locale, please use the method
getInstance()
instead of this method.
pattern
- A DecimalFormat
compatible pattern.IllegalArgumentException
- if the pattern is invalid.createInstance(String)
,
getDefaultPattern(ULocale, int)
@Deprecated public static DecimalFormat getInstance(String pattern, Locale locale)
numbers
specification in
the ULocale
. Better use
getInstance(String, ULocale)
instead.Note: The returned instance is shared and must not be destructively modified.
pattern
- A DecimalFormat
compatible pattern.locale
- The locale or null
for the current locale.IllegalArgumentException
- if the pattern is invalid.createInstance(String, Locale)
,
getDefaultPattern(ULocale, int)
public static DecimalFormat getInstance(String pattern, ULocale locale)
Note: The returned instance is shared and must not be destructively modified.
Note: This method ignores the number system specification in the locale,
if it specifies a number system that is not based on decimal digits. To
fully obey the locale, please use the method getInstance(ULocale)
instead of this method.
pattern
- A DecimalFormat
compatible pattern.locale
- The locale or null
for the current locale.IllegalArgumentException
- if the pattern is invalid.createInstance(String, ULocale)
,
getDefaultPattern(ULocale, int)
public static String getDefaultPattern(ULocale locale, int choice)
NUMBERSTYLE
,CURRENCYSTYLE
,PERCENTSTYLE
,SCIENTIFICSTYLE
,INTEGERSTYLE
,ISOCURRENCYSTYLE
,PLURALCURRENCYSTYLE
.createInstance(String, ULocale)
,
createInstance(String, Locale)
,
createInstance(String)
,
getInstance(String, ULocale)
,
getInstance(String, Locale)
, or
getInstance(String)
,
but it should not be used with DecimalFormat
directly.locale
- The locale or null
for the current locale.choice
- The style choices.public static NumberFormat createInstance()
getInstance()
@Deprecated public static NumberFormat createInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
createInstance(ULocale)
instead.getInstance(Locale)
public static NumberFormat createInstance(ULocale locale)
getInstance(ULocale)
public static NumberFormat createIntegerInstance()
getIntegerInstance()
@Deprecated public static NumberFormat createIntegerInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
createIntegerInstance(ULocale)
instead.getIntegerInstance(Locale)
public static NumberFormat createIntegerInstance(ULocale locale)
getIntegerInstance(ULocale)
public static NumberFormat createCurrencyInstance()
getCurrencyInstance()
@Deprecated public static NumberFormat createCurrencyInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
createCurrencyInstance(ULocale)
instead.getCurrencyInstance(Locale)
public static NumberFormat createCurrencyInstance(ULocale locale)
getCurrencyInstance(ULocale)
public static NumberFormat createPercentInstance()
getPercentInstance()
@Deprecated public static NumberFormat createPercentInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
createPercentInstance(ULocale)
instead.getPercentInstance(Locale)
public static NumberFormat createPercentInstance(ULocale locale)
getInstance(ULocale)
public static NumberFormat createScientificInstance()
getScientificInstance()
@Deprecated public static NumberFormat createScientificInstance(Locale locale)
numbers
specification in
the ULocale
. Better use
createScientificInstance(ULocale)
instead.getScientificInstance(Locale)
public static NumberFormat createScientificInstance(ULocale locale)
getScientificInstance(ULocale)
public static DecimalFormat createInstance(String pattern)
Note: This method ignores the number system specification in the current
locale, if it specifies a number system that is not based on decimal
digits. To fully obey the locale, please use the method
createInstance()
instead of this method.
pattern
- A DecimalFormat
compatible pattern.IllegalArgumentException
- if the pattern is invalid.getInstance(String)
,
getDefaultPattern(ULocale, int)
@Deprecated public static DecimalFormat createInstance(String pattern, Locale locale)
numbers
specification in
the ULocale
. Better use
createInstance(String, ULocale)
instead.pattern
- A DecimalFormat
compatible pattern.locale
- The locale or null
for the current locale.IllegalArgumentException
- if the pattern is invalid.getInstance(String, Locale)
,
getDefaultPattern(ULocale, int)
public static DecimalFormat createInstance(String pattern, ULocale locale)
Note: This method ignores the number system specification in the locale,
if it specifies a number system that is not based on decimal digits. To
fully obey the locale, please use the method
createInstance(ULocale)
instead of this method.
pattern
- A DecimalFormat
compatible pattern.locale
- The locale or null
for the current locale.IllegalArgumentException
- if the pattern is invalid.getInstance(String, ULocale)
,
getDefaultPattern(ULocale, int)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.