public abstract static class NumberFormat.NumberFormatFactory extends Object
Note: as of ICU4J 3.2, the default API for NumberFormatFactory uses ULocale instead of Locale. Instead of overriding createFormat(Locale, int), new implementations should override createFactory(ULocale, int). Note that one of these two methods MUST be overridden or else an infinite loop will occur.
Modifier and Type | Field and Description |
---|---|
static int |
FORMAT_CURRENCY
Value passed to format requesting a currency format.
|
static int |
FORMAT_INTEGER
Value passed to format requesting an integer format.
|
static int |
FORMAT_NUMBER
Value passed to format requesting a default number format.
|
static int |
FORMAT_PERCENT
Value passed to format requesting a percent format.
|
static int |
FORMAT_SCIENTIFIC
Value passed to format requesting a scientific format.
|
Modifier | Constructor and Description |
---|---|
protected |
NumberFormatFactory() |
Modifier and Type | Method and Description |
---|---|
NumberFormat |
createFormat(Locale loc,
int formatType)
Returns a number format of the appropriate type.
|
NumberFormat |
createFormat(ULocale loc,
int formatType)
Returns a number format of the appropriate type.
|
abstract Set<String> |
getSupportedLocaleNames()
Returns an immutable collection of the locale names directly
supported by this factory.
|
boolean |
visible()
Returns true if this factory is visible.
|
public static final int FORMAT_NUMBER
public static final int FORMAT_CURRENCY
public static final int FORMAT_PERCENT
public static final int FORMAT_SCIENTIFIC
public static final int FORMAT_INTEGER
public boolean visible()
public abstract Set<String> getSupportedLocaleNames()
public NumberFormat createFormat(ULocale loc, int formatType)
loc
- the locale for which to create the formatformatType
- the type of formatpublic NumberFormat createFormat(Locale loc, int formatType)
loc
- the locale for which to create the formatformatType
- the type of formatCopyright © 2016 Unicode, Inc. and others.