Serializable
, Cloneable
DateFormat
, DateIntervalFormat
, DurationFormat
, MeasureFormat
, MessageFormat
, NumberFormat
, PluralFormat
, TimeZoneFormat
public abstract class UFormat extends Format
Format
to provide
additional ICU protocol, specifically, the getLocale()
API. All ICU format classes are subclasses of this class.ULocale
,
Serialized FormFormat.Field
Constructor | Description |
---|---|
UFormat() |
Default constructor.
|
Modifier and Type | Method | Description |
---|---|---|
ULocale |
getLocale(ULocale.Type type) |
Return the locale that was used to create this object, or null.
|
clone, format, format, formatToCharacterIterator, parseObject, parseObject
public final ULocale getLocale(ULocale.Type type)
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.
type
- type of information requested, either ULocale.VALID_LOCALE
or ULocale.ACTUAL_LOCALE
.ULocale
,
ULocale.VALID_LOCALE
,
ULocale.ACTUAL_LOCALE
Copyright ? 2016 Unicode, Inc. and others.