com.ibm.icu.text

Class UFormat

public abstract class UFormat extends Format

An abstract class that extends {@link java.text.Format} to provide additional ICU protocol, specifically, the getLocale() API. All ICU format classes are subclasses of this class.

Author: weiv Alan Liu

See Also: ULocale

UNKNOWN: ICU 2.8 (retain) This API might change or be removed in a future release.

Constructor Summary
UFormat()
Method Summary
ULocalegetLocale(ULocale.Type type)
Return the locale that was used to create this object, or null.

Constructor Detail

UFormat

public UFormat()

UNKNOWN: ICU 2.8 (retain) This API might change or be removed in a future release.

Method Detail

getLocale

public final ULocale getLocale(ULocale.Type type)
Return the locale that was used to create this object, or null. This may may differ from the locale requested at the time of this object's creation. For example, if an object is created for locale en_US_CALIFORNIA, the actual data may be drawn from en (the actual locale), and en_US may be the most specific locale that exists (the valid locale).

Note: This method will be implemented in ICU 3.0; ICU 2.8 contains a partial preview implementation. The actual locale is returned correctly, but the valid locale is not, in most cases.

Parameters: type type of information requested, either {@link com.ibm.icu.util.ULocale#VALID_LOCALE} or {@link com.ibm.icu.util.ULocale#ACTUAL_LOCALE}.

Returns: the information specified by type, or null if this object was not constructed from locale data.

See Also: ULocale VALID_LOCALE ACTUAL_LOCALE

UNKNOWN: ICU 2.8 (retain) This API might change or be removed in a future release.