public final class LocaleData extends Object
Modifier and Type | Class and Description |
---|---|
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
|
Modifier and Type | Field and Description |
---|---|
static int |
ALT_QUOTATION_END
Delimiter type for
getDelimiter(int) . |
static int |
ALT_QUOTATION_START
Delimiter type for
getDelimiter(int) . |
static int |
DELIMITER_COUNT
Deprecated.
ICU 58 The numeric value may change over time, see ICU ticket #12420.
|
static int |
ES_AUXILIARY
EXType for
getExemplarSet(int, int) . |
static int |
ES_COUNT
Deprecated.
ICU 58 The numeric value may change over time, see ICU ticket #12420.
|
static int |
ES_CURRENCY
Deprecated.
ICU 51
|
static int |
ES_INDEX
EXType for
getExemplarSet(int, int) . |
static int |
ES_PUNCTUATION
Corresponds to the 'punctuation' CLDR exemplars in
http://www.unicode.org/reports/tr35/tr35-general.html#Character_Elements.
|
static int |
ES_STANDARD
EXType for
getExemplarSet(int, int) . |
static int |
QUOTATION_END
Delimiter type for
getDelimiter(int) . |
static int |
QUOTATION_START
Delimiter type for
getDelimiter(int) . |
Modifier and Type | Method and Description |
---|---|
static VersionInfo |
getCLDRVersion()
Returns the current CLDR version
|
String |
getDelimiter(int type)
Retrieves a delimiter string from the locale data.
|
UnicodeSet |
getExemplarSet(int options,
int extype)
Returns the set of exemplar characters for a locale.
|
static UnicodeSet |
getExemplarSet(ULocale locale,
int options)
Returns the set of exemplar characters for a locale.
|
static UnicodeSet |
getExemplarSet(ULocale locale,
int options,
int extype)
Returns the set of exemplar characters for a locale.
|
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
|
String |
getLocaleDisplayPattern()
Returns LocaleDisplayPattern for this locale, e.g., {0}({1})
|
String |
getLocaleSeparator()
Returns LocaleDisplaySeparator for this 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 ES_STANDARD
getExemplarSet(int, int)
.
Corresponds to the 'main' (aka 'standard') CLDR exemplars in
http://www.unicode.org/reports/tr35/tr35-general.html#Character_Elements.public static final int ES_AUXILIARY
getExemplarSet(int, int)
.
Corresponds to the 'auxiliary' CLDR exemplars in
http://www.unicode.org/reports/tr35/tr35-general.html#Character_Elements.public static final int ES_INDEX
getExemplarSet(int, int)
.
Corresponds to the 'index' CLDR exemplars in
http://www.unicode.org/reports/tr35/tr35-general.html#Character_Elements.@Deprecated public static final int ES_CURRENCY
getExemplarSet(int, int)
.
Corresponds to the 'currencySymbol' CLDR exemplars in
http://www.unicode.org/reports/tr35/tr35-general.html#Character_Elements.
Note: This type is no longer supported.public static final int ES_PUNCTUATION
getExemplarSet(int, int)
.@Deprecated public static final int ES_COUNT
getExemplarSet(int, int)
.public static final int QUOTATION_START
getDelimiter(int)
.public static final int QUOTATION_END
getDelimiter(int)
.public static final int ALT_QUOTATION_START
getDelimiter(int)
.public static final int ALT_QUOTATION_END
getDelimiter(int)
.@Deprecated public static final int DELIMITER_COUNT
getDelimiter(int)
.public static UnicodeSet getExemplarSet(ULocale locale, int options)
getExemplarSet(ULocale, int, int)
with
the extype == ES_STANDARD
.locale
- Locale for which the exemplar character set
is to be retrieved.options
- Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See UnicodeSet.applyPattern(String,
int)
for a complete list of valid options. The
IGNORE_SPACE bit is always set, regardless of the
value of 'options'.public static UnicodeSet getExemplarSet(ULocale locale, int options, int extype)
getExemplarSet(int, int)
.locale
- Locale for which the exemplar character set
is to be retrieved.options
- Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See UnicodeSet.applyPattern(String,
int)
for a complete list of valid options. The
IGNORE_SPACE bit is always set, regardless of the
value of 'options'.extype
- The type of exemplar character set to retrieve.public UnicodeSet getExemplarSet(int options, int extype)
options
- Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See UnicodeSet.applyPattern(String,
int)
for a complete list of valid options. The
IGNORE_SPACE bit is always set, regardless of the
value of 'options'.extype
- The type of exemplar set to be retrieved,
ES_STANDARD, ES_INDEX, ES_AUXILIARY, or ES_PUNCTUATIONgetNoSubstitute()
is true, otherwise the
root value is returned (which may be UnicodeSet.EMPTY).RuntimeException
- if the extype is invalid.public static final LocaleData getInstance(ULocale locale)
locale
- Locale with thich the locale data object is associated.public static final LocaleData getInstance()
FORMAT
localeULocale.Category.FORMAT
public 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 final LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
locale
- The locale for which the measurement system to be retrieved.public static final LocaleData.PaperSize getPaperSize(ULocale locale)
locale
- The locale for which the measurement system to be retrieved.public String getLocaleDisplayPattern()
public String getLocaleSeparator()
public static VersionInfo getCLDRVersion()
Copyright © 2016 Unicode, Inc. and others.