public final class LocaleData extends Object
| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
LocaleData.MeasurementSystem |
Enumeration for representing the measurement systems.
|
static class |
LocaleData.PaperSize |
A class that represents the size of letter head
used in the country
|
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
ALT_QUOTATION_END |
Delimiter type for
getDelimiter(int). |
static int |
ALT_QUOTATION_START |
Delimiter type for
getDelimiter(int). |
static int |
QUOTATION_END |
Delimiter type for
getDelimiter(int). |
static int |
QUOTATION_START |
Delimiter type for
getDelimiter(int). |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static VersionInfo |
getCLDRVersion() |
Returns the current CLDR version
|
String |
getDelimiter(int type) |
Retrieves a delimiter string from the locale data.
|
static LocaleData |
getInstance() |
Gets the LocaleData object associated with the default
FORMAT locale |
static LocaleData |
getInstance(ULocale locale) |
Gets the LocaleData object associated with the ULocale specified in locale
|
static LocaleData.MeasurementSystem |
getMeasurementSystem(ULocale locale) |
Returns the measurement system used in the locale specified by the locale.
|
boolean |
getNoSubstitute() |
Gets the "no substitute" behavior of this locale data object.
|
static LocaleData.PaperSize |
getPaperSize(ULocale locale) |
Returns the size of paper used in the locale.
|
void |
setNoSubstitute(boolean setting) |
Sets the "no substitute" behavior of this locale data object.
|
public static final int ALT_QUOTATION_END
getDelimiter(int).public static final int ALT_QUOTATION_START
getDelimiter(int).public static final int QUOTATION_END
getDelimiter(int).public static final int QUOTATION_START
getDelimiter(int).public static LocaleData getInstance(ULocale locale)
locale - Locale with thich the locale data object is associated.public static LocaleData getInstance()
FORMAT localeULocale.Category.FORMATpublic void setNoSubstitute(boolean setting)
setting - Value for the no substitute behavior. If TRUE,
methods of this locale data object will return
an error when no data is available for that method,
given the locale ID supplied to the constructor.public boolean getNoSubstitute()
public String getDelimiter(int type)
type - The type of delimiter string desired. Currently,
the valid choices are QUOTATION_START, QUOTATION_END,
ALT_QUOTATION_START, or ALT_QUOTATION_END.public static LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
locale - The locale for which the measurement system to be retrieved.public static LocaleData.PaperSize getPaperSize(ULocale locale)
locale - The locale for which the measurement system to be retrieved.public static VersionInfo getCLDRVersion()