|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.icu.text.NumberFormat.NumberFormatFactory
public abstract static class NumberFormat.NumberFormatFactory
A NumberFormatFactory is used to register new number formats. The factory should be able to create any of the predefined formats for each locale it supports. When registered, the locales it supports extend or override the locales already supported by ICU.
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.
Field Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
protected |
NumberFormat.NumberFormatFactory()
|
Method Summary | |
---|---|
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 |
getSupportedLocaleNames()
Returns an immutable collection of the locale names directly supported by this factory. |
boolean |
visible()
Returns true if this factory is visible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
protected NumberFormat.NumberFormatFactory()
Method Detail |
---|
public boolean visible()
public abstract Set getSupportedLocaleNames()
public NumberFormat createFormat(ULocale loc, int formatType)
loc
- the locale for which to create the formatformatType
- the type of format
public NumberFormat createFormat(Locale loc, int formatType)
loc
- the locale for which to create the formatformatType
- the type of format
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |