com.ibm.icu.util

Class LocaleData

public final class LocaleData extends Object

A class for accessing miscelleneous data in the locale bundles

Author: ram

UNKNOWN: ICU 2.8

Nested Class Summary
static classLocaleData.MeasurementSystem
Enumeration for representing the measurement systems.
static classLocaleData.PaperSize
A class that represents the size of letter head used in the country
Field Summary
static intALT_QUOTATION_END
Delimiter type for {@link #getDelimiter(int)}.
static intALT_QUOTATION_START
Delimiter type for {@link #getDelimiter(int)}.
static intDELIMITER_COUNT
Count of delimiter types for {@link #getDelimiter(int)}.
static intES_AUXILIARY
EXType for {@link #getExemplarSet(int, int)}.
static intES_COUNT
Count of EXTypes for {@link #getExemplarSet(int, int)}.
static intES_STANDARD
EXType for {@link #getExemplarSet(int, int)}.
static intQUOTATION_END
Delimiter type for {@link #getDelimiter(int)}.
static intQUOTATION_START
Delimiter type for {@link #getDelimiter(int)}.
Method Summary
StringgetDelimiter(int type)
Retrieves a delimiter string from the locale data.
static UnicodeSetgetExemplarSet(ULocale locale, int options)
Returns the set of exemplar characters for a locale.
UnicodeSetgetExemplarSet(int options, int extype)
Returns the set of exemplar characters for a locale.
static LocaleDatagetInstance(ULocale locale)
Gets the LocaleData object associated with the ULocale specified in locale
static LocaleDatagetInstance()
Gets the LocaleData object associated with the default locale
static LocaleData.MeasurementSystemgetMeasurementSystem(ULocale locale)
Returns the measurement system used in the locale specified by the locale.
booleangetNoSubstitute()
Gets the "no substitute" behavior of this locale data object.
static LocaleData.PaperSizegetPaperSize(ULocale locale)
Returns the size of paper used in the locale.
voidsetNoSubstitute(boolean setting)
Sets the "no substitute" behavior of this locale data object.

Field Detail

ALT_QUOTATION_END

public static final int ALT_QUOTATION_END
Delimiter type for {@link #getDelimiter(int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

ALT_QUOTATION_START

public static final int ALT_QUOTATION_START
Delimiter type for {@link #getDelimiter(int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

DELIMITER_COUNT

public static final int DELIMITER_COUNT
Count of delimiter types for {@link #getDelimiter(int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

ES_AUXILIARY

public static final int ES_AUXILIARY
EXType for {@link #getExemplarSet(int, int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

ES_COUNT

public static final int ES_COUNT
Count of EXTypes for {@link #getExemplarSet(int, int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

ES_STANDARD

public static final int ES_STANDARD
EXType for {@link #getExemplarSet(int, int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

QUOTATION_END

public static final int QUOTATION_END
Delimiter type for {@link #getDelimiter(int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

QUOTATION_START

public static final int QUOTATION_START
Delimiter type for {@link #getDelimiter(int)}.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

Method Detail

getDelimiter

public String getDelimiter(int type)
Retrieves a delimiter string from the locale data.

Parameters: type The type of delimiter string desired. Currently, the valid choices are QUOTATION_START, QUOTATION_END, ALT_QUOTATION_START, or ALT_QUOTATION_END.

Returns: The desired delimiter string.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

getExemplarSet

public static UnicodeSet getExemplarSet(ULocale locale, int options)
Returns the set of exemplar characters for a locale.

Parameters: 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 {@link UnicodeSet#applyPattern(String, int)} for a complete list of valid options. The IGNORE_SPACE bit is always set, regardless of the value of 'options'.

Returns: The set of exemplar characters for the given locale.

UNKNOWN: ICU 3.0 This API might change or be removed in a future release.

getExemplarSet

public UnicodeSet getExemplarSet(int options, int extype)
Returns the set of exemplar characters for a locale.

Parameters: 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 {@link 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 or ES_AUXILIARY

Returns: The set of exemplar characters for the given locale.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

getInstance

public static final LocaleData getInstance(ULocale locale)
Gets the LocaleData object associated with the ULocale specified in locale

Parameters: locale Locale with thich the locale data object is associated.

Returns: A locale data object.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

getInstance

public static final LocaleData getInstance()
Gets the LocaleData object associated with the default locale

Returns: A locale data object.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

getMeasurementSystem

public static final LocaleData.MeasurementSystem getMeasurementSystem(ULocale locale)
Returns the measurement system used in the locale specified by the locale.

Parameters: locale The locale for which the measurement system to be retrieved.

Returns: MeasurementSystem the measurement system used in the locale.

UNKNOWN: ICU 3.0 This API might change or be removed in a future release.

getNoSubstitute

public boolean getNoSubstitute()
Gets the "no substitute" behavior of this locale data object.

Returns: 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.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

getPaperSize

public static final LocaleData.PaperSize getPaperSize(ULocale locale)
Returns the size of paper used in the locale. The paper sizes returned are always in milli-meters.

Parameters: locale The locale for which the measurement system to be retrieved.

Returns: The paper size used in the locale

UNKNOWN: ICU 3.0 This API might change or be removed in a future release.

setNoSubstitute

public void setNoSubstitute(boolean setting)
Sets the "no substitute" behavior of this locale data object.

Parameters: 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.

UNKNOWN: ICU 3.4 This API might change or be removed in a future release.

Copyright (c) 2006 IBM Corporation and others.